interface EntityOwnerInterface (View source)

Defines a common interface for entities that have an owner.

An owner is someone who has primary control over an entity, similar to owners in Unix file system access. This may or may not be the entity's original author. The owner may also have less permissions than other users, such as administrators.

Methods

getOwner()

Returns the entity owner's user entity.

$this
setOwner(UserInterface $account)

Sets the entity owner's user entity.

int|null
getOwnerId()

Returns the entity owner's user ID.

$this
setOwnerId(int $uid)

Sets the entity owner's user ID.

Details

UserInterface getOwner()

Returns the entity owner's user entity.

Return Value

UserInterface

The owner user entity.

$this setOwner(UserInterface $account)

Sets the entity owner's user entity.

Parameters

UserInterface $account

The owner user entity.

Return Value

$this

int|null getOwnerId()

Returns the entity owner's user ID.

Return Value

int|null

The owner user ID, or NULL in case the user ID field has not been set on the entity.

$this setOwnerId(int $uid)

Sets the entity owner's user ID.

Parameters

int $uid

The owner user id.

Return Value

$this