public function WebformLibrariesManager::find in Webform 6.x
Finds files that are located in the supported 'libraries' directories.
Parameters
string $path: The path for the library file to find.
Return value
string|false The real path to the library file relative to the root directory. If the library cannot be found then FALSE.
Overrides WebformLibrariesManagerInterface::find
2 calls to WebformLibrariesManager::find()
- WebformLibrariesManager::initLibraries in src/
WebformLibrariesManager.php - Initialize libraries.
- WebformLibrariesManager::requirements in src/
WebformLibrariesManager.php - Get third party libraries status for hook_requirements and drush.
File
- src/
WebformLibrariesManager.php, line 241
Class
- WebformLibrariesManager
- Webform libraries manager.
Namespace
Drupal\webformCode
public function find($name) {
if (\Drupal::hasService('library.libraries_directory_file_finder')) {
return \Drupal::service('library.libraries_directory_file_finder')
->find($name);
}
else {
return file_exists('libraries/' . $name) ? 'libraries/' . $name : FALSE;
}
}