$uuid =
$this->
getUuid();
$entity =
$this->entityRepository->
loadEntityByUuid('menu_link_content',
$uuid);
} if (!
$entity) { throw new PluginException("Entity not found through the menu link plugin definition and could not fallback on UUID '
$uuid'"
);
} // Clone the entity object to avoid tampering with the static cache.
$this->entity =
clone $entity;
$the_entity =
$this->entityRepository->
getTranslationFromContext($this->entity
);
/** @var \Drupal\menu_link_content\MenuLinkContentInterface $the_entity */
$this->entity =
$the_entity;
$this->entity->
setInsidePlugin();
} return $this->entity;
} /**
* {@inheritdoc}
*/
public function getTitle() { // We only need to get the title from the actual entity if it may be a
// translation based on the current language context. This can only happen
// if the site is configured to be multilingual.