ContentEntityBase::baseFieldDefinitions

public static ContentEntityBase::baseFieldDefinitions(EntityTypeInterface $entity_type) Provides base field definitions for an entity type. Implementations typically use the class \Drupal\Core\Field\BaseFieldDefinition for creating the field definitions; for example a 'name' field could be defined as the following: $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')); By definition, base fields are fields that exist for every bundle. To provide definitions for fi

ContentEntityBase::addTranslation

public ContentEntityBase::addTranslation($langcode, array $values = array()) Adds a new translation to the translatable object. Parameters string $langcode: The language code identifying the translation. array $values: (optional) An array of initial values to be assigned to the translatable fields. Defaults to none. Return value $this Throws \InvalidArgumentException If an invalid or existing translation language is specified. Overrides TranslatableInterface::addTranslation File core/lib/Dru

ContentEntityBase::access

public ContentEntityBase::access($operation, AccountInterface $account = NULL, $return_as_object = FALSE) Checks data value access. Parameters string $operation: The operation to be performed. \Drupal\Core\Session\AccountInterface $account: (optional) The user for which to check access, or NULL to check access for the current user. Defaults to NULL. bool $return_as_object: (optional) Defaults to FALSE. Return value bool|\Drupal\Core\Access\AccessResultInterface The access result. Returns a bo

ContentEntityBase::$values

The plain data values of the contained fields. This always holds the original, unchanged values of the entity. The values are keyed by language code, whereas LanguageInterface::LANGCODE_DEFAULT is used for values in default language. @todo: Add methods for getting original fields and for determining changes. @todo: Provide a better way for defining default values. Type: array File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 49 Class ContentEntityBase Implements Entity Field API

ContentEntityBase::$validationRequired

Whether entity validation is required before saving the entity. Type: bool File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 163 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected $validationRequired = FALSE;

ContentEntityBase::$validated

Whether entity validation was performed. Type: bool File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 156 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected $validated = FALSE;

ContentEntityBase::$translations

An array of entity translation metadata. An associative array keyed by translation language code. Every value is an array containing the translation status and the translation object, if it has already been instantiated. Type: array File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 114 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected $translations = array();

ContentEntityBase::$translationInitialize

A flag indicating whether a translation object is being initialized. Type: bool File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 121 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected $translationInitialize = FALSE;

ContentEntityBase::$translatableEntityKeys

Holds translatable entity keys such as the label. Type: array File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 149 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected $translatableEntityKeys = array();

ContentEntityBase::$newRevision

Boolean indicating whether a new revision should be created on save. Type: bool File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 128 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected $newRevision = FALSE;