public function FontAwesomeManager::getCategoryMetadataFilepath in Font Awesome Icons 8.2
Returns the FontAwesome category metadata file path.
Return value
string The filepath of the metadata file.
1 call to FontAwesomeManager::getCategoryMetadataFilepath()
- FontAwesomeManager::getCategoryMetadata in src/
FontAwesomeManager.php - Loads the Font Awesome category metadata.
File
- src/
FontAwesomeManager.php, line 243
Class
- FontAwesomeManager
- Icon Manager Service for Font Awesome.
Namespace
Drupal\fontawesomeCode
public function getCategoryMetadataFilepath() {
// Attempt to load the icons from the local library's metadata if possible.
$metadataFile = $this->fileSystem
->realpath(DRUPAL_ROOT . '/libraries/fontawesome/metadata/categories.yml');
// If we can't load the local file, use the included module icons file.
if (!file_exists($metadataFile)) {
$metadataFile = drupal_get_path('module', 'fontawesome') . '/metadata/categories.yml';
}
return $metadataFile;
}