interface ProfileStorageInterface in Profile 8
Defines an interface for profile entity storage.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\profile\ProfileStorageInterface
Expanded class hierarchy of ProfileStorageInterface
All classes that implement ProfileStorageInterface
File
- src/
ProfileStorageInterface.php, line 11
Namespace
Drupal\profileView source
interface ProfileStorageInterface extends EntityStorageInterface {
/**
* Loads the given user's profiles.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user.
* @param string $profile_type_id
* The profile type ID.
* @param bool $published
* Whether to load published or unpublished profiles. Defaults to published.
*
* @return \Drupal\profile\Entity\ProfileInterface[]
* The profiles, ordered by publishing status and ID, descending.
*/
public function loadMultipleByUser(AccountInterface $account, $profile_type_id, $published = TRUE);
/**
* Loads the given user's profile.
*
* Takes the default profile, if found.
* Otherwise falls back to the newest published profile.
*
* Primarily used for profile types which only allow a
* single profile per user.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user.
* @param string $profile_type_id
* The profile type ID.
*
* @return \Drupal\profile\Entity\ProfileInterface|null
* The profile. NULL if no matching entity was found.
*/
public function loadByUser(AccountInterface $account, $profile_type_id);
/**
* Loads the given user's default profile.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user.
* @param string $profile_type_id
* The profile type ID.
*
* @return \Drupal\profile\Entity\ProfileInterface|null
* The profile. NULL if no matching entity was found.
*
* @deprecated in Profile 1.0. Use loadByUser() instead.
*/
public function loadDefaultByUser(AccountInterface $account, $profile_type_id);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityStorageInterface:: |
public | function | Constructs a new entity object, without permanently saving it. | 1 |
EntityStorageInterface:: |
public | function | Deletes permanently saved entities. | 1 |
EntityStorageInterface:: |
public | function | Delete a specific entity revision. | 4 |
EntityStorageInterface:: |
constant | Load the most recent version of an entity's field data. | ||
EntityStorageInterface:: |
constant | Load the version of an entity's field data specified in the entity. | ||
EntityStorageInterface:: |
public | function | Gets an aggregated query instance. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type definition. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type ID. | 1 |
EntityStorageInterface:: |
public | function | Gets an entity query instance. | 1 |
EntityStorageInterface:: |
public | function | Determines if the storage contains any data. | 1 |
EntityStorageInterface:: |
public | function | Loads one entity. | 1 |
EntityStorageInterface:: |
public | function | Load entities by their property values. | 1 |
EntityStorageInterface:: |
public | function | Loads one or more entities. | 1 |
EntityStorageInterface:: |
public | function | Load a specific entity revision. | 4 |
EntityStorageInterface:: |
public | function | Loads an unchanged entity from the database. | 1 |
EntityStorageInterface:: |
public | function | Resets the internal, static entity cache. | 1 |
EntityStorageInterface:: |
public | function | Restores a previously saved entity. | 1 |
EntityStorageInterface:: |
public | function | Saves the entity permanently. | 1 |
ProfileStorageInterface:: |
public | function | Loads the given user's profile. | 1 |
ProfileStorageInterface:: |
public | function | Loads the given user's default profile. | 1 |
ProfileStorageInterface:: |
public | function | Loads the given user's profiles. | 1 |