ContentEntityBase::getIterator

public ContentEntityBase::getIterator() File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 545 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code public function getIterator() { return new \ArrayIterator($this->getFields()); }

ContentEntityBase::getFields

public ContentEntityBase::getFields($include_computed = TRUE) Gets an array of all field item lists. Parameters bool $include_computed: If set to TRUE, computed fields are included. Defaults to TRUE. Return value \Drupal\Core\Field\FieldItemListInterface[] An array of field item lists implementing, keyed by field name. Overrides FieldableEntityInterface::getFields File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 519 Class ContentEntityBase Implements Entity Field API specific

ContentEntityBase::getFieldDefinitions

public ContentEntityBase::getFieldDefinitions() Gets an array of field definitions of all contained fields. Return value \Drupal\Core\Field\FieldDefinitionInterface[] An array of field definitions, keyed by field name. Overrides FieldableEntityInterface::getFieldDefinitions See also \Drupal\Core\Entity\EntityManagerInterface::getFieldDefinitions() File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 564 Class ContentEntityBase Implements Entity Field API specific enhancements to

ContentEntityBase::getFieldDefinition

public ContentEntityBase::getFieldDefinition($name) Gets the definition of a contained field. Parameters string $name: The name of the field. Return value \Drupal\Core\Field\FieldDefinitionInterface|null The definition of the field or null if the field does not exist. Overrides FieldableEntityInterface::getFieldDefinition File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 552 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namesp

ContentEntityBase::getEntityKey

protected ContentEntityBase::getEntityKey($key) Gets the value of the given entity key, if defined. Parameters string $key: Name of the entity key, for example id, revision or bundle. Return value mixed The value of the entity key, NULL if not defined. File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 1088 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected function getEntityKey($key) {

ContentEntityBase::get

public ContentEntityBase::get($field_name) Gets a field item list. Parameters string $field_name: The name of the field to get; e.g., 'title' or 'name'. Return value \Drupal\Core\Field\FieldItemListInterface The field item list, containing the field items. Throws \InvalidArgumentException If an invalid field name is given. Overrides FieldableEntityInterface::get File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 450 Class ContentEntityBase Implements Entity Field API specific

ContentEntityBase::createDuplicate

public ContentEntityBase::createDuplicate() Creates a duplicate of the entity. Return value static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system. Overrides Entity::createDuplicate File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 981 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code public function createDuplicate() { if ($this->transl

ContentEntityBase::clearTranslationCache

protected ContentEntityBase::clearTranslationCache() Clear entity translation object cache to remove stale references. File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 395 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected function clearTranslationCache() { foreach ($this->translations as &$translation) { unset($translation['entity']); } }

ContentEntityBase::bundleFieldDefinitions

public static ContentEntityBase::bundleFieldDefinitions(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) Provides field definitions for a specific bundle. This function can return definitions both for bundle fields (fields that are not defined in $base_field_definitions, and therefore might not exist on some bundles) as well as bundle-specific overrides of base fields (fields that are defined in $base_field_definitions, and therefore exist for all bundles). However, bun

ContentEntityBase::bundle

public ContentEntityBase::bundle() Gets the bundle of the entity. Return value string The bundle of the entity. Defaults to the entity type ID if the entity type does not make use of different bundles. Overrides Entity::bundle File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 429 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code public function bundle() { return $this->getEntityKey('bundle')