ContentEntityBase::isDefaultTranslation

public ContentEntityBase::isDefaultTranslation()

Checks whether the translation is the default one.

Return value

bool TRUE if the translation is the default one, FALSE otherwise.

Overrides TranslatableInterface::isDefaultTranslation

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 324

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function isDefaultTranslation() {
  return $this->activeLangcode === LanguageInterface::LANGCODE_DEFAULT;
}
doc_Drupal
2016-10-29 08:56:58
Comments
Leave a Comment

Please login to continue.