Implements \Drupal\Core\TypedData\AccessibleInterface::access().
Overrides AccessibleInterface::access
public function access($operation = 'view', AccountInterface $account = NULL) {
// Determine the language code of this translation by cutting of the
// leading "@" from the property name to get the langcode.
// @todo Add a way to set and get the langcode so that's more obvious what
// we're doing here.
$langcode = substr($this
->getName(), 1);
return \Drupal::entityManager()
->getAccessController($this->parent
->entityType())
->access($this->parent, $operation, $langcode, $account);
}