You are here

public function MiconIconManager::getIconMatch in Micon 2.x

Same name and namespace in other branches
  1. 8 src/MiconIconManager.php \Drupal\micon\MiconIconManager::getIconMatch()

Match an icon_id against the Micon package icon definitions.

Parameters

string $icon_id: The icon id as specified within the IcoMoon selection.json file.

Return value

\Drupal\micon\MiconIcon|null The found MiconIcon.

File

src/MiconIconManager.php, line 52

Class

MiconIconManager
Class MiconIconManager.

Namespace

Drupal\micon

Code

public function getIconMatch($icon_id) {
  $icons = $this
    ->getFlattenedIcons();
  return isset($icons[$icon_id]) ? $icons[$icon_id] : NULL;
}