function hook_libraries_info_file_paths in Libraries API 8.3
Same name and namespace in other branches
- 7.3 libraries.api.php \hook_libraries_info_file_paths()
- 7.2 libraries.api.php \hook_libraries_info_file_paths()
Specify paths to look for library info files.
Libraries API looks in the following directories for library info files by default:
- libraries
- profiles/$profile/libraries
- sites/all/libraries
- sites/$site/libraries
This hook allows you to specify additional locations to look for library info files. This should only be used for modules that declare many libraries. Modules that only implement a few libraries should implement hook_libraries_info().
Return value
An array of paths.
Deprecated
Will be removed before a stable Drupal 8 release.
1 function implements hook_libraries_info_file_paths()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- libraries_test_libraries_info_file_paths in tests/
modules/ libraries_test/ libraries_test.module - Implements hook_libraries_info_file_paths()
1 invocation of hook_libraries_info_file_paths()
- libraries_scan_info_files in ./
libraries.module - Looks for library info files.
File
- ./
libraries.api.php, line 605 - Documents API functions for Libraries module.
Code
function hook_libraries_info_file_paths() {
// Taken from the Libraries test module, which needs to specify the path to
// the test library.
return [
drupal_get_path('module', 'libraries_test') . '/example',
];
}