interface IconFinderInterface

Interface for icon finder.

@internal This API is experimental.

Hierarchy

Expanded class hierarchy of IconFinderInterface

All classes that implement IconFinderInterface

File

core/lib/Drupal/Core/Theme/Icon/IconFinderInterface.php, line 13

Namespace

Drupal\Core\Theme\Icon
View source
interface IconFinderInterface {
  
  /**
   * Create files from source paths.
   *
   * @param string[] $sources
   *   The list of paths or urls.
   * @param string $relative_path
   *   The current definition relative path.
   *
   * @return array<string, array<string, string|null>>
   *   List of files with metadata.
   */
  public function getFilesFromSources(array $sources, string $relative_path) : array;
  
  /**
   * Wrapper to the file_get_contents function.
   *
   * This allow usage in extractor and easier unit test.
   *
   * @param string $uri
   *   The URI to process, only local path allowed.
   *
   * @return string|bool
   *   The file content.
   */
  public function getFileContents(string $uri) : string|bool;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
IconFinderInterface::getFileContents public function Wrapper to the file_get_contents function. 1
IconFinderInterface::getFilesFromSources public function Create files from source paths. 1

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