Drupal 8  8.0.2
UserStorage Class Reference
Inheritance diagram for UserStorage:

Public Member Functions

 __construct (EntityTypeInterface $entity_type, Connection $database, EntityManagerInterface $entity_manager, CacheBackendInterface $cache, PasswordInterface $password, LanguageManagerInterface $language_manager)
 
 updateLastLoginTimestamp (UserInterface $account)
 
 updateLastAccessTimestamp (AccountInterface $account, $timestamp)
 
 deleteRoleReferences (array $rids)
 
- Public Member Functions inherited from SqlContentEntityStorage
 getFieldStorageDefinitions ()
 
 __construct (EntityTypeInterface $entity_type, Connection $database, EntityManagerInterface $entity_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager)
 
 getBaseTable ()
 
 getRevisionTable ()
 
 getDataTable ()
 
 getRevisionDataTable ()
 
 setEntityType (EntityTypeInterface $entity_type)
 
 getTableMapping (array $storage_definitions=NULL)
 
 delete (array $entities)
 
 save (EntityInterface $entity)
 
 requiresEntityStorageSchemaChanges (EntityTypeInterface $entity_type, EntityTypeInterface $original)
 
 requiresFieldStorageSchemaChanges (FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original)
 
 requiresEntityDataMigration (EntityTypeInterface $entity_type, EntityTypeInterface $original)
 
 requiresFieldDataMigration (FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original)
 
 onEntityTypeCreate (EntityTypeInterface $entity_type)
 
 onEntityTypeUpdate (EntityTypeInterface $entity_type, EntityTypeInterface $original)
 
 onEntityTypeDelete (EntityTypeInterface $entity_type)
 
 onFieldStorageDefinitionCreate (FieldStorageDefinitionInterface $storage_definition)
 
 onFieldStorageDefinitionUpdate (FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original)
 
 onFieldStorageDefinitionDelete (FieldStorageDefinitionInterface $storage_definition)
 
 onFieldDefinitionDelete (FieldDefinitionInterface $field_definition)
 
 onBundleCreate ($bundle, $entity_type_id)
 
 onBundleDelete ($bundle, $entity_type_id)
 
 finalizePurge (FieldStorageDefinitionInterface $storage_definition)
 
 countFieldData ($storage_definition, $as_bool=FALSE)
 
- Public Member Functions inherited from ContentEntityStorageBase
 __construct (EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, CacheBackendInterface $cache)
 
 hasData ()
 
 createTranslation (ContentEntityInterface $entity, $langcode, array $values=[])
 
 onFieldStorageDefinitionCreate (FieldStorageDefinitionInterface $storage_definition)
 
 onFieldStorageDefinitionUpdate (FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original)
 
 onFieldStorageDefinitionDelete (FieldStorageDefinitionInterface $storage_definition)
 
 onFieldDefinitionCreate (FieldDefinitionInterface $field_definition)
 
 onFieldDefinitionUpdate (FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original)
 
 onFieldDefinitionDelete (FieldDefinitionInterface $field_definition)
 
 purgeFieldData (FieldDefinitionInterface $field_definition, $batch_size)
 
 finalizePurge (FieldStorageDefinitionInterface $storage_definition)
 
 loadRevision ($revision_id)
 
 resetCache (array $ids=NULL)
 
- Public Member Functions inherited from EntityStorageBase
 __construct (EntityTypeInterface $entity_type)
 
 getEntityTypeId ()
 
 getEntityType ()
 
 loadUnchanged ($id)
 
 resetCache (array $ids=NULL)
 
 create (array $values=array())
 
 load ($id)
 
 loadMultiple (array $ids=NULL)
 
 delete (array $entities)
 
 save (EntityInterface $entity)
 
 loadByProperties (array $values=array())
 
 getQuery ($conjunction= 'AND')
 
 getAggregateQuery ($conjunction= 'AND')
 
- Public Member Functions inherited from EntityHandlerBase
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
- Public Member Functions inherited from EntityStorageInterface
 deleteRevision ($revision_id)
 

Static Public Member Functions

static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 
- Static Public Member Functions inherited from SqlContentEntityStorage
static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 
- Static Public Member Functions inherited from ContentEntityStorageBase
static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 

Protected Member Functions

 doSaveFieldItems (ContentEntityInterface $entity, array $names=[])
 
 isColumnSerial ($table_name, $schema_name)
 
- Protected Member Functions inherited from SqlContentEntityStorage
 initTableLayout ()
 
 getStorageSchema ()
 
 doLoadMultiple (array $ids=NULL)
 
 getFromStorage (array $ids=NULL)
 
 mapFromStorageRecords (array $records, $load_from_revision=FALSE)
 
 loadFromSharedTables (array &$values, array &$translations)
 
 doLoadRevisionFieldItems ($revision_id)
 
 doDeleteRevisionFieldItems (ContentEntityInterface $revision)
 
 buildPropertyQuery (QueryInterface $entity_query, array $values)
 
 buildQuery ($ids, $revision_id=FALSE)
 
 doDeleteFieldItems ($entities)
 
 doSaveFieldItems (ContentEntityInterface $entity, array $names=[])
 
 has ($id, EntityInterface $entity)
 
 saveToSharedTables (ContentEntityInterface $entity, $table_name=NULL, $new_revision=NULL)
 
 mapToStorageRecord (ContentEntityInterface $entity, $table_name=NULL)
 
 isColumnSerial ($table_name, $schema_name)
 
 mapToDataStorageRecord (EntityInterface $entity, $table_name=NULL)
 
 saveRevision (ContentEntityInterface $entity)
 
 getQueryServiceName ()
 
 loadFromDedicatedTables (array &$values, $load_from_revision)
 
 saveToDedicatedTables (ContentEntityInterface $entity, $update=TRUE, $names=array())
 
 deleteFromDedicatedTables (ContentEntityInterface $entity)
 
 deleteRevisionFromDedicatedTables (ContentEntityInterface $entity)
 
 wrapSchemaException (callable $callback)
 
 readFieldItemsToPurge (FieldDefinitionInterface $field_definition, $batch_size)
 
 purgeFieldItems (ContentEntityInterface $entity, FieldDefinitionInterface $field_definition)
 
 storageDefinitionIsDeleted (FieldStorageDefinitionInterface $storage_definition)
 
- Protected Member Functions inherited from ContentEntityStorageBase
 doCreate (array $values)
 
 initFieldValues (ContentEntityInterface $entity, array $values=[], array $field_names=[])
 
 readFieldItemsToPurge (FieldDefinitionInterface $field_definition, $batch_size)
 
 purgeFieldItems (ContentEntityInterface $entity, FieldDefinitionInterface $field_definition)
 
 doLoadRevisionFieldItems ($revision_id)
 
 doSaveFieldItems (ContentEntityInterface $entity, array $names=[])
 
 doDeleteFieldItems ($entities)
 
 doDeleteRevisionFieldItems (ContentEntityInterface $revision)
 
 invokeTranslationHooks (ContentEntityInterface $entity)
 
 invokeStorageLoadHook (array &$entities)
 
 invokeFieldMethod ($method, ContentEntityInterface $entity)
 
 invokeFieldPostSave (ContentEntityInterface $entity, $update)
 
 hasFieldValueChanged (FieldDefinitionInterface $field_definition, ContentEntityInterface $entity, ContentEntityInterface $original)
 
 populateAffectedRevisionTranslations (ContentEntityInterface $entity)
 
 cleanIds (array $ids)
 
 getFromPersistentCache (array &$ids=NULL)
 
 setPersistentCache ($entities)
 
 buildCacheId ($id)
 
- Protected Member Functions inherited from EntityStorageBase
 getFromStaticCache (array $ids)
 
 setStaticCache (array $entities)
 
 invokeHook ($hook, EntityInterface $entity)
 
 doCreate (array $values)
 
 doLoadMultiple (array $ids=NULL)
 
 postLoad (array &$entities)
 
 mapFromStorageRecords (array $records)
 
 has ($id, EntityInterface $entity)
 
 doDelete ($entities)
 
 doPreSave (EntityInterface $entity)
 
 doSave ($id, EntityInterface $entity)
 
 doPostSave (EntityInterface $entity, $update)
 
 buildPropertyQuery (QueryInterface $entity_query, array $values)
 
 getQueryServiceName ()
 
- Protected Member Functions inherited from EntityHandlerBase
 moduleHandler ()
 

Protected Attributes

 $password
 
- Protected Attributes inherited from SqlContentEntityStorage
 $tableMapping
 
 $revisionKey = FALSE
 
 $langcodeKey = FALSE
 
 $defaultLangcodeKey = FALSE
 
 $baseTable
 
 $revisionTable
 
 $dataTable
 
 $revisionDataTable
 
 $database
 
 $storageSchema
 
 $languageManager
 
- Protected Attributes inherited from ContentEntityStorageBase
 $bundleKey = FALSE
 
 $entityManager
 
 $cacheBackend
 
- Protected Attributes inherited from EntityStorageBase
 $entities = array()
 
 $entityTypeId
 
 $entityType
 
 $idKey
 
 $uuidKey
 
 $langcodeKey
 
 $uuidService
 
 $entityClass
 
- Protected Attributes inherited from EntityHandlerBase
 $moduleHandler
 

Additional Inherited Members

- Data Fields inherited from EntityStorageInterface
const FIELD_LOAD_CURRENT = 'FIELD_LOAD_CURRENT'
 
const FIELD_LOAD_REVISION = 'FIELD_LOAD_REVISION'
 

Detailed Description

Controller class for users.

This extends the Drupal class, adding required special handling for user objects.

Constructor & Destructor Documentation

__construct ( EntityTypeInterface  $entity_type,
Connection  $database,
EntityManagerInterface  $entity_manager,
CacheBackendInterface  $cache,
PasswordInterface  $password,
LanguageManagerInterface  $language_manager 
)

Constructs a new UserStorage object.

Parameters
\Drupal\Core\Entity\EntityTypeInterface$entity_typeThe entity type definition.
\Drupal\Core\Database\Connection$databaseThe database connection to be used.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Drupal\Core\Cache\CacheBackendInterface$cache_backendCache backend instance to use.
\Drupal\Core\Password\PasswordInterface$passwordThe password hashing service.
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.

Member Function Documentation

static createInstance ( ContainerInterface  $container,
EntityTypeInterface  $entity_type 
)
static

{Instantiates a new instance of this entity handler.This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe service container this object should use.
\Drupal\Core\Entity\EntityTypeInterface$entity_typeThe entity type definition.
Returns
static A new instance of the entity handler.
}

Implements EntityHandlerInterface.

References EntityTypeInterface\get().

Here is the call graph for this function:

deleteRoleReferences ( array  $rids)

{Delete role references.

Parameters
array$ridsThe list of role IDs being deleted. The storage should remove permission and user references to this role.
}

Implements UserStorageInterface.

References Drupal\database(), and ContentEntityStorageBase\resetCache().

Here is the call graph for this function:

doSaveFieldItems ( ContentEntityInterface  $entity,
array  $names = [] 
)
protected

{}

References Drupal\database(), EntityInterface\enforceIsNew(), and EntityInterface\id().

Here is the call graph for this function:

isColumnSerial (   $table_name,
  $schema_name 
)
protected

{}

updateLastAccessTimestamp ( AccountInterface  $account,
  $timestamp 
)

{Update the last access timestamp of the user.

Parameters
\Drupal\Core\Session\AccountInterface$accountThe user object.
int$timestampThe last access timestamp.
}

Implements UserStorageInterface.

References Drupal\database(), AccountInterface\id(), and ContentEntityStorageBase\resetCache().

Here is the call graph for this function:

updateLastLoginTimestamp ( UserInterface  $account)

{Update the last login timestamp of the user.

Parameters
\Drupal\user\UserInterface$account
}

Implements UserStorageInterface.

References Drupal\database(), UserInterface\getLastLoginTime(), AccountInterface\id(), and ContentEntityStorageBase\resetCache().

Here is the call graph for this function:


The documentation for this class was generated from the following file: