function IconPackManager::getIconsFromDefinition
Discover list of icons from definition extractor.
Parameters
array $definition: The definition.
Return value
array Discovered icons.
1 call to IconPackManager::getIconsFromDefinition()
- IconPackManager::processDefinition in core/
lib/ Drupal/ Core/ Theme/ Icon/ Plugin/ IconPackManager.php - Performs extra processing on plugin definitions.
File
-
core/
lib/ Drupal/ Core/ Theme/ Icon/ Plugin/ IconPackManager.php, line 381
Class
- IconPackManager
- Defines an icon pack plugin manager to deal with icons.
Namespace
Drupal\Core\Theme\Icon\PluginCode
private function getIconsFromDefinition(array $definition) : array {
if (!isset($definition['extractor'])) {
return [];
}
/** @var \Drupal\Core\Theme\Icon\IconExtractorInterface $extractor */
$extractor = $this->iconPackExtractorManager
->createInstance($definition['extractor'], $definition);
return $extractor->discoverIcons();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.