function IconFinder::getFileContents
Overrides IconFinderInterface::getFileContents
File
-
core/
lib/ Drupal/ Core/ Theme/ Icon/ IconFinder.php, line 114
Class
- IconFinder
- Icon finder to discover files under specific paths or URLs.
Namespace
Drupal\Core\Theme\IconCode
public function getFileContents(string $uri) : string|bool {
$url = parse_url($uri);
if (isset($url['scheme']) || isset($url['host'])) {
return FALSE;
}
if (!file_exists($uri)) {
return FALSE;
}
return file_get_contents($uri);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.