ContentEntityBase::hasTranslationChanges

public ContentEntityBase::hasTranslationChanges() Determines if the current translation of the entity has unsaved changes. If the entity is translatable only translatable fields will be checked for changes. Return value bool TRUE if the current translation of the entity has changes. Overrides ContentEntityInterface::hasTranslationChanges File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 1187 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity

ContentEntityBase::hasTranslation

public ContentEntityBase::hasTranslation($langcode) Returns TRUE there is a translation for the given language code. Parameters string $langcode: The language code identifying the translation. Return value bool TRUE if the translation exists, FALSE otherwise. Overrides TranslatableInterface::hasTranslation File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 801 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core

ContentEntityBase::hasField

public ContentEntityBase::hasField($field_name) Determines whether the entity has a field with the given name. Parameters string $field_name: The field name. Return value bool TRUE if the entity has a field with the given name. FALSE otherwise. Overrides FieldableEntityInterface::hasField File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 443 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code publ

ContentEntityBase::getUntranslated

public ContentEntityBase::getUntranslated() Returns the translatable object referring to the original language. Return value $this The translation object referring to the original language. Overrides TranslatableInterface::getUntranslated File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 754 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code public function getUntranslated() { return $this->g

ContentEntityBase::getTranslationLanguages

public ContentEntityBase::getTranslationLanguages($include_default = TRUE) Returns the languages the data is translated to. Parameters bool $include_default: (optional) Whether the default language should be included. Defaults to TRUE. Return value \Drupal\Core\Language\LanguageInterface[] An associative array of language objects, keyed by language codes. Overrides TranslatableInterface::getTranslationLanguages File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 857 Class Content

ContentEntityBase::getTranslation

public ContentEntityBase::getTranslation($langcode) Gets a translation of the data. The returned translation has to be of the same type than this typed data object. Parameters $langcode: The language code of the translation to get or LanguageInterface::LANGCODE_DEFAULT to get the data in default language. Return value $this A typed data object for the translated data. Throws \InvalidArgumentException If an invalid or non-existing translation language is specified. Overrides TranslatableInter

ContentEntityBase::getTranslatedField

protected ContentEntityBase::getTranslatedField($name, $langcode) Gets a translated field. Return value \Drupal\Core\Field\FieldItemListInterface File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 462 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected function getTranslatedField($name, $langcode) { if ($this->translations[$this->activeLangcode]['status'] == static::TRANSLATION_REM

ContentEntityBase::getTranslatableFields

public ContentEntityBase::getTranslatableFields($include_computed = TRUE) Gets an array of field item lists for translatable fields. 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::getTranslatableFields File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 532 Class ContentEnti

ContentEntityBase::getRevisionId

public ContentEntityBase::getRevisionId() Gets the revision identifier of the entity. Return value The revision identifier of the entity, or NULL if the entity does not have a revision identifier. Overrides RevisionableInterface::getRevisionId File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 331 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code public function getRevisionId() { return $this-&g

ContentEntityBase::getLanguages

protected ContentEntityBase::getLanguages() File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 238 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected function getLanguages() { if (empty($this->languages)) { $this->languages = $this->languageManager()->getLanguages(LanguageInterface::STATE_ALL); // If the entity references a language that is not or no longer available,