function IconExtractorWithFinder::checkRequiredConfigSources
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Theme/Icon/IconExtractorWithFinder.php \Drupal\Core\Theme\Icon\IconExtractorWithFinder::checkRequiredConfigSources()
Check the required `config > sources` value from definition.
Throws
\Drupal\Core\Theme\Icon\Exception\IconPackConfigErrorException If the config:sources value in definition is not set or not valid.
File
-
core/
lib/ Drupal/ Core/ Theme/ Icon/ IconExtractorWithFinder.php, line 81
Class
- IconExtractorWithFinder
- Base class for icon_extractor plugins.
Namespace
Drupal\Core\Theme\IconCode
protected function checkRequiredConfigSources() : void {
if (!isset($this->configuration['config']['sources']) || empty($this->configuration['config']['sources']) || !is_array($this->configuration['config']['sources'])) {
throw new IconPackConfigErrorException(sprintf('Missing or invalid `config: sources` in your definition, extractor %s requires this value as array.', $this->getPluginId()));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.