function IconCollector::get

Overrides CacheCollector::get

File

core/lib/Drupal/Core/Theme/Icon/IconCollector.php, line 48

Class

IconCollector
A CacheCollector implementation for building icons info.

Namespace

Drupal\Core\Theme\Icon

Code

public function get($key, array $definition = []) : ?IconDefinitionInterface {
    $this->lazyLoadCache();
    if (\array_key_exists($key, $this->storage)) {
        return $this->storage[$key];
    }
    else {
        return $this->resolveCacheMiss($key, $definition);
    }
}

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