You are here

protected function AllowedHtmlManager::getType in Markdown 8.2

Retrieves plugins matching a specific type.

Parameters

string $type: The type to retrieve.

array[]|null $definitions: (optional) The plugin definitions to group. If omitted, all plugin definitions are used.

Return value

array[] Keys are type names, and values are arrays of which the keys are plugin IDs and the values are plugin definitions.

4 calls to AllowedHtmlManager::getType()
AllowedHtmlManager::getExtensionDefinitions in src/PluginManager/AllowedHtmlManager.php
Retrieves definitions supported by parser extensions.
AllowedHtmlManager::getFilterDefinitions in src/PluginManager/AllowedHtmlManager.php
Retrieves definitions required by filters.
AllowedHtmlManager::getParserDefinitions in src/PluginManager/AllowedHtmlManager.php
Retrieves the definition provided by the parser.
AllowedHtmlManager::getThemeDefinitions in src/PluginManager/AllowedHtmlManager.php
Retrieves definitions supported by the active theme.

File

src/PluginManager/AllowedHtmlManager.php, line 372

Class

AllowedHtmlManager
Markdown Allowed HTML Plugin Manager.

Namespace

Drupal\markdown\PluginManager

Code

protected function getType($type, array $definitions = NULL) {
  $grouped_definitions = $this
    ->getGroupedDefinitions($definitions);
  return isset($grouped_definitions[$type]) ? $grouped_definitions[$type] : [];
}