function IconExtractorBase::loadIcon
Overrides IconExtractorInterface::loadIcon
1 method overrides IconExtractorBase::loadIcon()
- SvgExtractor::loadIcon in core/
lib/ Drupal/ Core/ Theme/ Plugin/ IconExtractor/ SvgExtractor.php - Load an icon object.
File
-
core/
lib/ Drupal/ Core/ Theme/ Icon/ IconExtractorBase.php, line 72
Class
- IconExtractorBase
- Base class for icon extractor plugins.
Namespace
Drupal\Core\Theme\IconCode
public function loadIcon(array $icon_data) : ?IconDefinitionInterface {
if (!isset($icon_data['icon_id']) || empty($icon_data['icon_id'])) {
return NULL;
}
return $this->createIcon($icon_data['icon_id'], $icon_data['source'] ?? '', $icon_data['group'] ?? NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.