protected function getTranslatorPermissions() { return array_filter([$this->
getTranslatePermission(), 'create content translations', 'update content translations', 'delete content translations'
]);
} /**
* Returns the translate permissions for the current entity and bundle.
*/
protected function getTranslatePermission() { $entity_type = \Drupal::
entityTypeManager()->
getDefinition($this->entityTypeId
);
if ($permission_granularity =
$entity_type->
getPermissionGranularity()) { return $permission_granularity == 'bundle' ? "translate {
$this->bundle
} {
$this->entityTypeId
}" : "translate {
$this->entityTypeId
}";
} } /**
* Returns an array of permissions needed for the editor.
*/
protected function getEditorPermissions() { // Every entity-type-specific test needs to define these.
return [];
}