You are here

protected function Tracker::isEntityTranslatable in Menu Entity Index 8

Checks, if an entity is translatable.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to check.

Return value

bool TRUE, if entity is translatable. Otherwise FALSE.

1 call to Tracker::isEntityTranslatable()
Tracker::updateEntity in src/Tracker.php
Updates database tracking for new or updated entities.

File

src/Tracker.php, line 408

Class

Tracker
Tracks menu links and their referenced entities.

Namespace

Drupal\menu_entity_index

Code

protected function isEntityTranslatable(EntityInterface $entity) {

  // @todo: Decide what to do with the default translation check.
  return $entity instanceof TranslatableInterface && $entity
    ->isTranslatable();

  /* && !$entity->isDefaultTranslation()*/
}