function TestExtractorWithFinder::discoverIcons

Overrides IconExtractorInterface::discoverIcons

File

core/modules/system/tests/modules/icon_test/src/Plugin/IconExtractor/TestExtractorWithFinder.php, line 28

Class

TestExtractorWithFinder
Test plugin implementation of the icon_extractor.

Namespace

Drupal\icon_test\Plugin\IconExtractor

Code

public function discoverIcons() : array {
    $files = $this->getFilesFromSources();
    $icons = [];
    foreach ($files as $file) {
        if (!isset($file['icon_id'])) {
            continue;
        }
        $icons[] = $this->createIcon($file['icon_id'], $file['source'], $file['group'] ?? NULL);
    }
    return $icons;
}

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