ContentEntityStorageBase::invokeFieldMethod

protected ContentEntityStorageBase::invokeFieldMethod($method, ContentEntityInterface $entity) Invokes a method on the Field objects within an entity. Any argument passed will be forwarded to the invoked method. Parameters string $method: The name of the method to be invoked. \Drupal\Core\Entity\ContentEntityInterface $entity: The entity object. Return value array A multidimensional associative array of results, keyed by entity translation language code and field name. File core/lib/Drupal/Co

ContentEntityStorageBase::initFieldValues

protected ContentEntityStorageBase::initFieldValues(ContentEntityInterface $entity, array $values = [], array $field_names = []) Initializes field values. Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: An entity object. array $values: (optional) An associative array of initial field values keyed by field name. If none is provided default values will be applied. array $field_names: (optional) An associative array of field names to be initialized. If none is provided all fields w

ContentEntityStorageBase::hasFieldValueChanged

protected ContentEntityStorageBase::hasFieldValueChanged(FieldDefinitionInterface $field_definition, ContentEntityInterface $entity, ContentEntityInterface $original) Checks whether the field values changed compared to the original entity. Parameters \Drupal\Core\Field\FieldDefinitionInterface $field_definition: Field definition of field to compare for changes. \Drupal\Core\Entity\ContentEntityInterface $entity: Entity to check for field changes. \Drupal\Core\Entity\ContentEntityInterface $ori

ContentEntityStorageBase::hasData

public ContentEntityStorageBase::hasData() Determines if the storage contains any data. Return value bool TRUE if the storage contains data, FALSE if not. Overrides DynamicallyFieldableEntityStorageInterface::hasData File core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 68 Class ContentEntityStorageBase Base class for content entity storage handlers. Namespace Drupal\Core\Entity Code public function hasData() { return (bool) $this->getQuery() ->accessCheck(FA

ContentEntityStorageBase::getFromPersistentCache

protected ContentEntityStorageBase::getFromPersistentCache(array &$ids = NULL) Gets entities from the persistent cache backend. Parameters array|null &$ids: If not empty, return entities that match these IDs. IDs that were found will be removed from the list. Return value \Drupal\Core\Entity\ContentEntityInterface[] Array of entities from the persistent cache. File core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 583 Class ContentEntityStorageBase Base class for con

ContentEntityStorageBase::finalizePurge

public ContentEntityStorageBase::finalizePurge(FieldStorageDefinitionInterface $storage_definition) Performs final cleanup after all data of a field has been purged. Parameters \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The field being purged. Overrides DynamicallyFieldableEntityStorageInterface::finalizePurge File core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 213 Class ContentEntityStorageBase Base class for content entity storage handlers.

ContentEntityStorageBase::doSaveFieldItems

abstract protected ContentEntityStorageBase::doSaveFieldItems(ContentEntityInterface $entity, array $names = []) Writes entity field values to the storage. This method is responsible for allocating entity and revision identifiers and updating the entity object with their values. Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: The entity object. string[] $names: (optional) The name of the fields to be written to the storage. If an empty value is passed all field values are saved.

ContentEntityStorageBase::doSave

protected ContentEntityStorageBase::doSave($id, EntityInterface $entity) Performs storage-specific saving of the entity. Parameters int|string $id: The original entity ID. \Drupal\Core\Entity\EntityInterface $entity: The entity to save. Return value bool|int If the record insert or update failed, returns FALSE. If it succeeded, returns SAVED_NEW or SAVED_UPDATED, depending on the operation performed. Overrides EntityStorageBase::doSave File core/lib/Drupal/Core/Entity/ContentEntityStorageBase

ContentEntityStorageBase::doPreSave

protected ContentEntityStorageBase::doPreSave(EntityInterface $entity) Performs presave entity processing. Parameters \Drupal\Core\Entity\EntityInterface $entity: The saved entity. Return value int|string The processed entity identifier. Throws \Drupal\Core\Entity\EntityStorageException If the entity identifier is invalid. Overrides EntityStorageBase::doPreSave File core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 285 Class ContentEntityStorageBase Base class for content e

ContentEntityStorageBase::doPostSave

protected ContentEntityStorageBase::doPostSave(EntityInterface $entity, $update) Performs post save entity processing. Parameters \Drupal\Core\Entity\EntityInterface $entity: The saved entity. bool $update: Specifies whether the entity is being updated or created. Overrides EntityStorageBase::doPostSave File core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 297 Class ContentEntityStorageBase Base class for content entity storage handlers. Namespace Drupal\Core\Entity Code