You are here

function slick_libraries_get_path in Slick Carousel 8.2

Provides a wrapper to replace deprecated libraries_get_path() at ease.

@todo remove and replace with blazy_libraries_get_path() post blazy:8.x-2.0.

3 calls to slick_libraries_get_path()
SlickSkinManager::getEasingPath in src/SlickSkinManager.php
Returns easing library path if available, else FALSE.
SlickSkinManager::getSlickPath in src/SlickSkinManager.php
Returns slick library path if available, else FALSE.
SlickSkinManager::libraryInfoAlter in src/SlickSkinManager.php
Implements hook_library_info_alter().

File

./slick.module, line 85
Slick carousel integration, the last carousel you'll ever need.

Code

function slick_libraries_get_path($name, $base_path = FALSE) {
  $function = 'libraries_get_path';
  if (\Drupal::hasService('library.libraries_directory_file_finder')) {
    return \Drupal::service('library.libraries_directory_file_finder')
      ->find($name);
  }
  elseif (is_callable($function)) {
    return $function($name, $base_path);
  }
  return FALSE;
}