Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/user/src/EntityOwnerInterface.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\user; | |
4 | |
5 /** | |
6 * Defines a common interface for entities that have an owner. | |
7 * | |
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. | |
12 */ | |
13 interface EntityOwnerInterface { | |
14 | |
15 /** | |
16 * Returns the entity owner's user entity. | |
17 * | |
18 * @return \Drupal\user\UserInterface | |
19 * The owner user entity. | |
20 */ | |
21 public function getOwner(); | |
22 | |
23 /** | |
24 * Sets the entity owner's user entity. | |
25 * | |
26 * @param \Drupal\user\UserInterface $account | |
27 * The owner user entity. | |
28 * | |
29 * @return $this | |
30 */ | |
31 public function setOwner(UserInterface $account); | |
32 | |
33 /** | |
34 * Returns the entity owner's user ID. | |
35 * | |
36 * @return int|null | |
37 * The owner user ID, or NULL in case the user ID field has not been set on | |
38 * the entity. | |
39 */ | |
40 public function getOwnerId(); | |
41 | |
42 /** | |
43 * Sets the entity owner's user ID. | |
44 * | |
45 * @param int $uid | |
46 * The owner user id. | |
47 * | |
48 * @return $this | |
49 */ | |
50 public function setOwnerId($uid); | |
51 | |
52 } |