isAnyStoredRevisionTranslated example


  protected function isAnyRevisionTranslated(TranslatableInterface $entity) {
    return $entity->getTranslationLanguages(FALSE) || $this->isAnyStoredRevisionTranslated($entity);
  }

  /** * Checks whether any stored entity revision is translated. * * A revisionable entity can have translations in a pending revision, hence * the default revision may appear as not translated. This determines whether * the entity has any translation in the storage and thus should be considered * as multilingual. * * @param \Drupal\Core\Entity\TranslatableInterface $entity * The entity object to be checked. * * @return bool * TRUE if the entity has at least one translation in any revision, FALSE * otherwise. * * @see \Drupal\Core\TypedData\TranslatableInterface::getTranslationLanguages() * @see \Drupal\Core\Entity\ContentEntityStorageBase::isAnyRevisionTranslated() */
Home | Imprint | This part of the site doesn't use cookies.