function IconPackManager::getIcon

Get definition of a specific icon.

Parameters

string $icon_full_id: The ID of the icon to retrieve, include pack id.

Return value

\Drupal\Core\Theme\Icon\IconDefinitionInterface|null Icon definition.

Overrides IconPackManagerInterface::getIcon

File

core/lib/Drupal/Core/Theme/Icon/Plugin/IconPackManager.php, line 260

Class

IconPackManager
Defines an icon pack plugin manager to deal with icons.

Namespace

Drupal\Core\Theme\Icon\Plugin

Code

public function getIcon(string $icon_full_id) : ?IconDefinitionInterface {
  return $this->iconCollector
    ->get($icon_full_id, $this->getDefinitions());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.