diff --git a/core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php b/core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php index bb9df77..9bb7d2b 100644 --- a/core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php +++ b/core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php @@ -21,10 +21,11 @@ public function getCategories(); /** - * Gets sorted definitions. + * Gets sorted plugin definitions. * * @param array[]|null $definitions - * (optional) The definitions to sort. If omitted, all definitions are used. + * (optional) The plugin definitions to sort. If omitted, all plugin + * definitions are used. * * @return array[] * An array of plugin definitions, sorted by category and label. @@ -32,14 +33,14 @@ public function getCategories(); public function getSortedDefinitions(array $definitions = NULL); /** - * Gets sorted definitions grouped by category. + * Gets sorted plugin definitions grouped by category. * * In addition to grouping, both categories and its entries are sorted, - * whereas definitions are sorted by label. + * whereas plugin definitions are sorted by label. * * @param array[]|null $definitions - * (optional) The definitions to group. If omitted, all definitions are - * used. + * (optional) The plugin definitions to group. If omitted, all plugin + * definitions are used. * * @return array[] * Keys are category names, and values are arrays of which the keys are diff --git a/core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php b/core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php index 6cb8c5a..66fa31c 100644 --- a/core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php +++ b/core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php @@ -31,7 +31,7 @@ protected $moduleData; /** - * Processes a definition to ensure there is a category. + * Processes a plugin definition to ensure there is a category. * * If the definition lacks a category, it defaults to the providing module. * diff --git a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php index 7c151c0..8c6fee9 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php @@ -90,6 +90,7 @@ public function testProcessDefinitionCategory() { $this->pluginManager->processDefinition($definition, 'some'); $this->assertSame($definition['category'], 'Node'); } + } /** @@ -134,7 +135,9 @@ public function processDefinition(&$definition, $plugin_id) { parent::processDefinition($definition, $plugin_id); $this->processDefinitionCategory($definition); } + } + } namespace { @@ -147,5 +150,7 @@ public function processDefinition(&$definition, $plugin_id) { function system_get_info($type, $name = NULL) { return ['node' => ['name' => 'Node']]; } + } + }