Mixin_Owner

class Mixin_Owner

Package: Record\Mixin

Mixin for models that have a user that is their “owner.”

property _record
property _column
__construct($record, $column = owner_id)
Parameters:
  • $record (unknown) –
  • $column (unknown) –
beforeSave($args)
Parameters:
  • $args (unknown) –
setOwner(User $user)

Set the record’s owner.

Parameters:
getOwner()

Get the record’s owner.

If the record has no user, this method returns null.

Returns:User|null
isOwnedBy(User $user)

Check if the given User owns this record.

Parameters:
Returns:

boolean

Project Versions

Previous topic

Mixin_ElementText

Next topic

Mixin_PublicFeatured

This Page