Mixin_Owner

Package: Record\Mixin

class Mixin_Owner

extends Omeka_Record_Mixin_AbstractMixin

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

property Mixin_Owner::$_record

protected

property Mixin_Owner::$_column

protected

Mixin_Owner::__construct($record, $column = 'owner_id')
Parameters:
  • $record

  • $column

Mixin_Owner::beforeSave($args)
Parameters:
  • $args

Mixin_Owner::setOwner(User $user)

Set the record’s owner.

Parameters:
Mixin_Owner::getOwner()

Get the record’s owner.

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

Returns:

User|null

Mixin_Owner::isOwnedBy(User $user)

Check if the given User owns this record.

Parameters:
Returns:

bool