function IconCollector::resolveCacheMiss
Resolves a cache miss.
When an offset is not found in the object, this is treated as a cache miss. This method allows classes using this implementation to look up the actual value and allow it to be cached.
Parameters
string $key: The offset that was requested.
Return value
mixed The value of the offset, or NULL if no value was found.
Overrides CacheCollector::resolveCacheMiss
1 call to IconCollector::resolveCacheMiss()
- IconCollector::get in core/
lib/ Drupal/ Core/ Theme/ Icon/ IconCollector.php - Gets value from the cache.
File
-
core/
lib/ Drupal/ Core/ Theme/ Icon/ IconCollector.php, line 61
Class
- IconCollector
- A CacheCollector implementation for building icons info.
Namespace
Drupal\Core\Theme\IconCode
public function resolveCacheMiss($key, array $definition = []) : ?IconDefinitionInterface {
$icon = $this->getIconFromExtractor($key, $definition);
$this->storage[$key] = $icon;
$this->persist($key);
return $icon;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.