X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fbetter_formats%2Fsrc%2FBetterFormatsPermissions.php;fp=web%2Fmodules%2Fcontrib%2Fbetter_formats%2Fsrc%2FBetterFormatsPermissions.php;h=79ea9dd46a119345ddcec58222902cf78fc46eb4;hp=a023808f78900c51bf289e4a1a470f8c3629c311;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/modules/contrib/better_formats/src/BetterFormatsPermissions.php b/web/modules/contrib/better_formats/src/BetterFormatsPermissions.php index a023808f7..79ea9dd46 100644 --- a/web/modules/contrib/better_formats/src/BetterFormatsPermissions.php +++ b/web/modules/contrib/better_formats/src/BetterFormatsPermissions.php @@ -3,7 +3,7 @@ namespace Drupal\better_formats; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; -use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,18 +17,18 @@ class BetterFormatsPermissions implements ContainerInjectionInterface { /** * The entity manager. * - * @var \Drupal\Core\Entity\EntityManagerInterface + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ - protected $entityManager; + protected $entityTypeManager; /** * Constructs a new BetterFormatsPermissions instance. * - * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager * The entity manager. */ - public function __construct(EntityManagerInterface $entity_manager) { - $this->entityManager = $entity_manager; + public function __construct(EntityTypeManagerInterface $entity_type_manager) { + $this->entityTypeManager = $entity_type_manager; } /** @@ -47,7 +47,7 @@ class BetterFormatsPermissions implements ContainerInjectionInterface { $permissions = []; // Generate permissions for each entity type. - foreach ($this->entityManager->getDefinitions() as $entity_type_id => $entity_type) { + foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) { if ($entity_type->get('field_ui_base_route')) { $permissions['hide format selection for ' . $entity_type_id] = [ 'title' => $this->t('Hide format selection for @label', ['@label' => $entity_type->getLabel()]),