diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 2d5786d..ae931f6 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -207,7 +207,7 @@ public function getRenderController($entity_type) { if (!isset($this->controllers['render'][$entity_type])) { $class = $this->getControllerClass($entity_type, 'render'); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { - $this->controllers['render'][$entity_type] = $class::createInstance($this->container, $entity_type, $this->getDefinition($entity_type)); + $this->controllers['render'][$entity_type] = $class::createInstance($this->container, $this->getDefinition($entity_type), $entity_type); } else { $this->controllers['render'][$entity_type] = new $class($entity_type); diff --git a/core/modules/action/lib/Drupal/action/ActionListController.php b/core/modules/action/lib/Drupal/action/ActionListController.php index 2af2f12..cc00880 100644 --- a/core/modules/action/lib/Drupal/action/ActionListController.php +++ b/core/modules/action/lib/Drupal/action/ActionListController.php @@ -13,6 +13,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Config\Entity\ConfigEntityListController; use Drupal\Core\Entity\EntityStorageControllerInterface; +use \Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\action\Form\ActionAdminManageForm; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -38,13 +39,17 @@ class ActionListController extends ConfigEntityListController implements EntityC * * @param string $entity_type * The entity type. + * @param array $entity_info + * An array of entity info for the entity type. * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage * The action storage controller. * @param \Drupal\Core\Action\ActionManager $action_manager * The action plugin manager. + * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler + * The module handler to invoke hooks on. */ - public function __construct($entity_type, EntityStorageControllerInterface $storage, ActionManager $action_manager) { - parent::__construct($entity_type, $storage); + public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ActionManager $action_manager, ModuleHandlerInterface $module_handler) { + parent::__construct($entity_type, $entity_info, $storage, $module_handler); $this->actionManager = $action_manager; } @@ -55,8 +60,10 @@ public function __construct($entity_type, EntityStorageControllerInterface $stor public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, + $entity_info, $container->get('plugin.manager.entity')->getStorageController($entity_type), - $container->get('plugin.manager.action') + $container->get('plugin.manager.action'), + $container->get('module_handler') ); }