Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CategorizingPluginManagerInterface.php

interface CategorizingPluginManagerInterface

Defines an interface for plugin managers that categorize plugin definitions.

Hierarchy

  • interface \Drupal\Component\Plugin\Discovery\DiscoveryInterface; interface \Drupal\Component\Plugin\Factory\FactoryInterface; interface \Drupal\Component\Plugin\Mapper\MapperInterface
    • interface \Drupal\Component\Plugin\PluginManagerInterface extends \Drupal\Component\Plugin\Discovery\DiscoveryInterface \Drupal\Component\Plugin\Factory\FactoryInterface \Drupal\Component\Plugin\Mapper\MapperInterface
      • interface \Drupal\Component\Plugin\CategorizingPluginManagerInterface extends \Drupal\Component\Plugin\PluginManagerInterface

Expanded class hierarchy of CategorizingPluginManagerInterface

All classes that implement CategorizingPluginManagerInterface

5 files declare their use of CategorizingPluginManagerInterface
ActionManager.php in core/lib/Drupal/Core/Action/ActionManager.php
BlockManagerInterface.php in core/lib/Drupal/Core/Block/BlockManagerInterface.php
ConditionManager.php in core/lib/Drupal/Core/Condition/ConditionManager.php
FieldTypePluginManagerInterface.php in core/lib/Drupal/Core/Field/FieldTypePluginManagerInterface.php
LayoutPluginManagerInterface.php in core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php

File

core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php, line 8

Namespace

Drupal\Component\Plugin
View source
interface CategorizingPluginManagerInterface extends PluginManagerInterface {
    
    /**
     * Gets the names of all categories.
     *
     * @return string[]
     *   An array of translated categories, sorted alphabetically.
     */
    public function getCategories();
    
    /**
     * Gets sorted plugin definitions.
     *
     * @param array[]|null $definitions
     *   (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.
     */
    public function getSortedDefinitions(?array $definitions = NULL);
    
    /**
     * Gets sorted plugin definitions grouped by category.
     *
     * In addition to grouping, both categories and its entries are sorted,
     * whereas plugin definitions are sorted by label.
     *
     * @param array[]|null $definitions
     *   (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
     *   plugin IDs and the values are plugin definitions.
     */
    public function getGroupedDefinitions(?array $definitions = NULL);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
CategorizingPluginManagerInterface::getCategories public function Gets the names of all categories.
CategorizingPluginManagerInterface::getGroupedDefinitions public function Gets sorted plugin definitions grouped by category. 2
CategorizingPluginManagerInterface::getSortedDefinitions public function Gets sorted plugin definitions. 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal