diff --git a/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php b/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php index 08e771a..4dbd9d5 100644 --- a/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php +++ b/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php @@ -8,8 +8,24 @@ namespace Drupal\Component\Plugin; /** - * @todo. + * Provides a plugin interface for providing derivative metadata inspection. */ -class DerivativeInspectionInterface { +interface DerivativeInspectionInterface { + + /** + * Returns the base_plugin_id of the plugin instance. + * + * @return string + * The base_plugin_id of the plugin instance. + */ + public function getBasePluginId(); + + /** + * Returns the derivative_id of the plugin instance. + * + * @return string|null + * The derivative_id of the plugin instance NULL otherwise. + */ + public function getDerivativeId(); } diff --git a/core/lib/Drupal/Component/Plugin/PluginBase.php b/core/lib/Drupal/Component/Plugin/PluginBase.php index d4e00bb..8c3f274 100644 --- a/core/lib/Drupal/Component/Plugin/PluginBase.php +++ b/core/lib/Drupal/Component/Plugin/PluginBase.php @@ -9,7 +9,7 @@ /** * Base class for plugins wishing to support metadata inspection. */ -abstract class PluginBase implements PluginInspectionInterface { +abstract class PluginBase implements PluginInspectionInterface, DerivativeInspectionInterface { /** * The plugin_id. diff --git a/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php b/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php index eedd3ab..71fee3b 100644 --- a/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php +++ b/core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php @@ -23,22 +23,6 @@ public function getPluginId(); /** - * Returns the base_plugin_id of the plugin instance. - * - * @return string - * The base_plugin_id of the plugin instance. - */ - public function getBasePluginId(); - - /** - * Returns the derivative_id of the plugin instance. - * - * @return string|null - * The derivative_id of the plugin instance NULL otherwise. - */ - public function getDerivativeId(); - - /** * Returns the definition of the plugin implementation. * * @return array