protected function ContentEntityStorageBase::isAnyRevisionTranslated in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::isAnyRevisionTranslated()
- 10 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::isAnyRevisionTranslated()
Checks whether any entity revision is translated.
Parameters
\Drupal\Core\Entity\TranslatableInterface $entity: The entity object to be checked.
Return value
bool TRUE if the entity has at least one translation in any revision, FALSE otherwise.
See also
\Drupal\Core\TypedData\TranslatableInterface::getTranslationLanguages()
\Drupal\Core\Entity\ContentEntityStorageBase::isAnyStoredRevisionTranslated()
1 call to ContentEntityStorageBase::isAnyRevisionTranslated()
- ContentEntityStorageBase::createRevision in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Creates a new revision starting off from the specified entity object.
File
- core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php, line 216
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\EntityCode
protected function isAnyRevisionTranslated(TranslatableInterface $entity) {
return $entity
->getTranslationLanguages(FALSE) || $this
->isAnyStoredRevisionTranslated($entity);
}