Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
56
core/modules/user/src/EntityOwnerInterface.php
Normal file
56
core/modules/user/src/EntityOwnerInterface.php
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\user\EntityOwnerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\user;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
interface EntityOwnerInterface {
|
||||
|
||||
/**
|
||||
* Returns the entity owner's user entity.
|
||||
*
|
||||
* @return \Drupal\user\UserInterface
|
||||
* The owner user entity.
|
||||
*/
|
||||
public function getOwner();
|
||||
|
||||
/**
|
||||
* Sets the entity owner's user entity.
|
||||
*
|
||||
* @param \Drupal\user\UserInterface $account
|
||||
* The owner user entity.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwner(UserInterface $account);
|
||||
|
||||
/**
|
||||
* Returns the entity owner's user ID.
|
||||
*
|
||||
* @return int
|
||||
* The owner user ID.
|
||||
*/
|
||||
public function getOwnerId();
|
||||
|
||||
/**
|
||||
* Sets the entity owner's user ID.
|
||||
*
|
||||
* @param int $uid
|
||||
* The owner user id.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwnerId($uid);
|
||||
|
||||
}
|
Reference in a new issue