CoolCMS API

PersonalDataOwner
in package

FinalYes

Names the field that holds the owner's id; the owner sees their own personal data in full regardless of the {@see PersonalDataExposure} mode.

For User the field is id. With $via, the owner is read from the parent row in _references.

Usage:

#[PersonalDataOwner('insertUserId')]
abstract class Advert extends BaseEntity
Attributes
#[Attribute]
\Attribute::TARGET_CLASS

Table of Contents

Properties

$field  : string
$via  : string|null

Methods

__construct()  : mixed

Properties

Methods

__construct()

public __construct(string $field[, string|null $via = null ]) : mixed
Parameters
$field : string

field with the owner id, or with $via the association to the parent

$via : string|null = null

parent field with the owner id, read from the parent row in _references (advert parameter -> advert -> insertUserId); when the parent is not in the response, the caller is not the owner and the data is masked

On this page

Search results