function IconExtractorWithFinder::getFilesFromSources

Create files data from sources config.

Return value

array<string, array<string, string|null>> List of files with metadata.

Overrides IconExtractorWithFinderInterface::getFilesFromSources

4 calls to IconExtractorWithFinder::getFilesFromSources()
PathExtractor::discoverIcons in core/lib/Drupal/Core/Theme/Plugin/IconExtractor/PathExtractor.php
Get a list of all the icons discovered by this extractor.
SvgExtractor::discoverIcons in core/lib/Drupal/Core/Theme/Plugin/IconExtractor/SvgExtractor.php
Get a list of all the icons discovered by this extractor.
SvgSpriteExtractor::discoverIcons in core/lib/Drupal/Core/Theme/Plugin/IconExtractor/SvgSpriteExtractor.php
Get a list of all the icons discovered by this extractor.
TestExtractorWithFinder::discoverIcons in core/modules/system/tests/modules/icon_test/src/Plugin/IconExtractor/TestExtractorWithFinder.php
Get a list of all the icons discovered by this extractor.

File

core/lib/Drupal/Core/Theme/Icon/IconExtractorWithFinder.php, line 62

Class

IconExtractorWithFinder
Base class for icon_extractor plugins.

Namespace

Drupal\Core\Theme\Icon

Code

public function getFilesFromSources() : array {
  $this->checkRequiredConfigSources();
  if (!isset($this->configuration['relative_path'])) {
    throw new IconPackConfigErrorException(sprintf('Empty relative path for extractor %s.', $this->getPluginId()));
  }
  return $this->iconFinder
    ->getFilesFromSources($this->configuration['config']['sources'], $this->configuration['relative_path']);
}

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