diff --git a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php index 1d166aa..06ff295 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php +++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php @@ -7,7 +7,7 @@ namespace Drupal\system\Plugin\views\field; -use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\views\Plugin\views\display\DisplayPluginBase; use Drupal\views\Plugin\views\field\FieldPluginBase; use Drupal\views\Plugin\views\style\Table; @@ -21,11 +21,11 @@ abstract class BulkFormBase extends FieldPluginBase { /** - * The entity manager. + * The action storage controller. * - * @var \Drupal\Core\Entity\EntityManagerInterface + * @var \Drupal\Core\Entity\EntityStorageControllerInterface */ - protected $entityManager; + protected $actionStorage; /** * An array of actions that can be executed. @@ -43,20 +43,20 @@ * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. - * @param \Drupal\Core\Entity\EntityManagerInterface $manager - * The entity manager. + * @param \Drupal\Core\Entity\EntityManagerInterface $storage + * The action storage controller. */ - public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityManagerInterface $manager) { + public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityStorageControllerInterface $storage) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->entityManager = $manager; + $this->actionStorage = $storage; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) { - return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity.manager')); + return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity.manager')->getStorageController('action')); } /** @@ -67,7 +67,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o $entity_type = $this->getEntityType(); // Filter the actions to only include those for this entity type. - $this->actions = array_filter($this->entityManager->getStorageController('action')->loadMultiple(), function ($action) use ($entity_type) { + $this->actions = array_filter($this->actionStorage->loadMultiple(), function ($action) use ($entity_type) { return $action->getType() == $entity_type; }); }