diff --git a/core/modules/action/lib/Drupal/action/ActionOperationsProvider.php b/core/modules/action/lib/Drupal/action/ActionOperationsProvider.php index b4f6af5..1e476c2 100644 --- a/core/modules/action/lib/Drupal/action/ActionOperationsProvider.php +++ b/core/modules/action/lib/Drupal/action/ActionOperationsProvider.php @@ -7,13 +7,13 @@ namespace Drupal\action; +use Drupal\Core\Config\Entity\ConfigEntityOperationsProvider; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityOperationsProvider; /** * Defines a entity operations controller for action entities. */ -class ActionOperationsProvider extends EntityOperationsProvider { +class ActionOperationsProvider extends ConfigEntityOperationsProvider { /** * {@inheritdoc} diff --git a/core/modules/block/lib/Drupal/block/BlockListController.php b/core/modules/block/lib/Drupal/block/BlockListController.php index 90cd994..0a22154 100644 --- a/core/modules/block/lib/Drupal/block/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/BlockListController.php @@ -67,12 +67,12 @@ class BlockListController extends ConfigEntityListController implements FormInte * The entity storage controller class. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to invoke hooks on. - * @param \Drupal\Component\Plugin\PluginManagerInterface $block_manager - * The block manager. * @param |Drupal\Core\Session\AccountInterface $current_user * The current user. + * @param \Drupal\Component\Plugin\PluginManagerInterface $block_manager + * The block manager. */ - public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, EntityOperationsProviderInterface $operations, ModuleHandlerInterface $module_handler, PluginManagerInterface $block_manager, AccountInterface $current_user) { + public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, EntityOperationsProviderInterface $operations, ModuleHandlerInterface $module_handler, AccountInterface $current_user, PluginManagerInterface $block_manager) { parent::__construct($entity_type, $entity_info, $storage, $operations, $module_handler, $current_user); $this->blockManager = $block_manager; @@ -88,8 +88,8 @@ public static function createInstance(ContainerInterface $container, $entity_typ $container->get('entity.manager')->getStorageController($entity_type), $container->get('entity.manager')->getOperationsProvider($entity_type), $container->get('module_handler'), - $container->get('plugin.manager.block'), - $container->get('current_user') + $container->get('current_user'), + $container->get('plugin.manager.block') ); } @@ -295,7 +295,10 @@ public function buildForm(array $form, array &$form_state) { 'class' => array('block-weight', 'block-weight-' . $region), ), ); - $form['blocks'][$entity_id]['operations'] = $this->buildOperations($info['entity']); + $form['blocks'][$entity_id]['operations']['data'] = array( + '#type' => 'operations', + '#links' => $this->operations->getOperations($info['entity'], $this->currentUser), + ); } } } diff --git a/core/modules/block/lib/Drupal/block/Entity/BlockOperationsProvider.php b/core/modules/block/lib/Drupal/block/Entity/BlockOperationsProvider.php index 4a111a3..7632b4a 100644 --- a/core/modules/block/lib/Drupal/block/Entity/BlockOperationsProvider.php +++ b/core/modules/block/lib/Drupal/block/Entity/BlockOperationsProvider.php @@ -7,13 +7,13 @@ namespace Drupal\block; +use Drupal\Core\Config\Entity\ConfigEntityOperationsProvider; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityOperationsProvider; /** * Defines a entity operations controller for block entities. */ -class BlockOperationsProvider extends EntityOperationsProvider { +class BlockOperationsProvider extends ConfigEntityOperationsProvider { /** * {@inheritdoc} diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php index b69a692..ca980c5 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php @@ -12,8 +12,10 @@ use Drupal\Core\Config\Entity\DraggableListController; use Drupal\Core\Entity\EntityControllerInterface; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityOperationsProviderInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Session\AccountInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -42,13 +44,17 @@ class FilterFormatListController extends DraggableListController implements Enti * An array of entity info for the entity type. * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage * The entity storage controller class. + * @param \Drupal\Core\Entity\EntityOperationsProviderInterface $operations + * The entity operations provider. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to invoke hooks on. + * @param |Drupal\Core\Session\AccountInterface $current_user + * The current user. * @param \Drupal\Core\Config\ConfigFactory $config_factory * The config factory. */ - public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, ConfigFactory $config_factory) { - parent::__construct($entity_type, $entity_info, $storage, $module_handler); + public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, EntityOperationsProviderInterface $operations, ModuleHandlerInterface $module_handler, AccountInterface $current_user, ConfigFactory $config_factory) { + parent::__construct($entity_type, $entity_info, $storage, $operations, $module_handler, $current_user); $this->configFactory = $config_factory; } @@ -61,7 +67,9 @@ public static function createInstance(ContainerInterface $container, $entity_typ $entity_type, $entity_info, $container->get('entity.manager')->getStorageController($entity_type), + $container->get('entity.manager')->getOperationsProvider($entity_type), $container->get('module_handler'), + $container->get('current_user'), $container->get('config.factory') ); } diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatOperationsProvider.php b/core/modules/filter/lib/Drupal/filter/FilterFormatOperationsProvider.php index c40eefd..208b9fc 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatOperationsProvider.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatOperationsProvider.php @@ -7,13 +7,13 @@ namespace Drupal\filter; +use Drupal\Core\Config\Entity\ConfigEntityOperationsProvider; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityOperationsProvider; /** * Defines a entity operations controller for filter_format entities. */ -class FilterFormatOperationsProvider extends EntityOperationsProvider { +class FilterFormatOperationsProvider extends ConfigEntityOperationsProvider { /** * {@inheritdoc} diff --git a/core/modules/language/lib/Drupal/language/LanguageOperationsProvider.php b/core/modules/language/lib/Drupal/language/LanguageOperationsProvider.php index 1f6f182..6801373 100644 --- a/core/modules/language/lib/Drupal/language/LanguageOperationsProvider.php +++ b/core/modules/language/lib/Drupal/language/LanguageOperationsProvider.php @@ -7,13 +7,13 @@ namespace Drupal\language; +use Drupal\Core\Config\Entity\ConfigEntityOperationsProvider; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityOperationsProvider; /** * Defines a entity operations controller for language entities. */ -class LanguageOperationsProvider extends EntityOperationsProvider { +class LanguageOperationsProvider extends ConfigEntityOperationsProvider { /** * {@inheritdoc} diff --git a/core/modules/node/lib/Drupal/node/NodeTypeOperationsProvider.php b/core/modules/node/lib/Drupal/node/NodeTypeOperationsProvider.php index 4ae1b50..b290998 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeOperationsProvider.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeOperationsProvider.php @@ -7,13 +7,13 @@ namespace Drupal\node; +use Drupal\Core\Config\Entity\ConfigEntityOperationsProvider; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityOperationsProvider; /** * Defines a entity operations controller for node_type entities. */ -class NodeTypeOperationsProvider extends EntityOperationsProvider { +class NodeTypeOperationsProvider extends ConfigEntityOperationsProvider { /** * {@inheritdoc} diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewOperationsProvider.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewOperationsProvider.php index d17149c..74c6aac 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewOperationsProvider.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewOperationsProvider.php @@ -7,13 +7,13 @@ namespace Drupal\views_ui; +use Drupal\Core\Config\Entity\ConfigEntityOperationsProvider; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityOperationsProvider; /** * Defines a entity operations controller for view entities. */ -class ViewOperationsProvider extends EntityOperationsProvider { +class ViewOperationsProvider extends ConfigEntityOperationsProvider { /** * {@inheritdoc}