6 * Defines a common interface for entities that have an owner.
8 * An owner is someone who has primary control over an entity, similar to
9 * owners in Unix file system access. This may or may not be the entity's
10 * original author. The owner may also have less permissions than other users,
11 * such as administrators.
13 interface EntityOwnerInterface {
16 * Returns the entity owner's user entity.
18 * @return \Drupal\user\UserInterface
19 * The owner user entity.
21 public function getOwner();
24 * Sets the entity owner's user entity.
26 * @param \Drupal\user\UserInterface $account
27 * The owner user entity.
31 public function setOwner(UserInterface $account);
34 * Returns the entity owner's user ID.
37 * The owner user ID, or NULL in case the user ID field has not been set on
40 public function getOwnerId();
43 * Sets the entity owner's user ID.
50 public function setOwnerId($uid);