diff --git a/core/lib/Drupal/Core/Block/BlockPluginInterface.php b/core/lib/Drupal/Core/Block/BlockPluginInterface.php index ea8ef36..a25486f 100644 --- a/core/lib/Drupal/Core/Block/BlockPluginInterface.php +++ b/core/lib/Drupal/Core/Block/BlockPluginInterface.php @@ -12,6 +12,7 @@ use Drupal\Core\Cache\CacheableInterface; use Drupal\Component\Plugin\PluginInspectionInterface; use Drupal\Component\Plugin\ConfigurablePluginInterface; +use Drupal\Core\Entity\OperationsProviderInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Plugin\PluginFormInterface; use Drupal\Core\Session\AccountInterface; @@ -26,7 +27,7 @@ * * @ingroup block_api */ -interface BlockPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface, CacheableInterface, DerivativeInspectionInterface { +interface BlockPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface, CacheableInterface, DerivativeInspectionInterface, OperationsProviderInterface { /** * Returns the user-facing block label. @@ -174,12 +175,4 @@ public function getVisibilityCondition($instance_id); */ public function setVisibilityConfig($instance_id, array $configuration); - /** - * Returns a list of operation links available for this block. - * - * @return array - * Array of operation links. - */ - public function getOperationLinks(); - } diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php index 190a6c2..06ef6bd 100644 --- a/core/lib/Drupal/Core/Entity/EntityInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityInterface.php @@ -12,7 +12,7 @@ /** * Defines a common interface for all entity objects. */ -interface EntityInterface extends AccessibleInterface { +interface EntityInterface extends AccessibleInterface, OperationsProviderInterface { /** * Returns the entity UUID (Universally Unique Identifier). @@ -377,12 +377,4 @@ public function getCacheTag(); */ public function getListCacheTags(); - /** - * Returns a list of operation links available for this entity. - * - * @return array - * Array of operations links. - */ - public function getOperationLinks(); - } diff --git a/core/lib/Drupal/Core/Entity/OperationsProviderInterface.php b/core/lib/Drupal/Core/Entity/OperationsProviderInterface.php index e69de29..bc873e0 100644 --- a/core/lib/Drupal/Core/Entity/OperationsProviderInterface.php +++ b/core/lib/Drupal/Core/Entity/OperationsProviderInterface.php @@ -0,0 +1,23 @@ +