You are here

public function SlickSkinManager::getSlickPath in Slick Carousel 8.2

Returns slick library path if available, else FALSE.

2 calls to SlickSkinManager::getSlickPath()
SlickSkinManager::isBreaking in src/SlickSkinManager.php
Check for breaking libraries: Slick 1.9.0, or Accessible Slick.
SlickSkinManager::libraryInfoAlter in src/SlickSkinManager.php
Implements hook_library_info_alter().

File

src/SlickSkinManager.php, line 357

Class

SlickSkinManager
Provides Slick skin manager.

Namespace

Drupal\slick

Code

public function getSlickPath() {
  if (!isset($this->slickPath)) {
    if ($this
      ->config('library') == 'accessible-slick') {
      $library_path = slick_libraries_get_path('accessible-slick');
      if (!$library_path) {
        $path = 'libraries/accessible-slick';
      }
    }
    else {
      $library_path = slick_libraries_get_path('slick-carousel') ?: slick_libraries_get_path('slick');
      if (!$library_path) {
        $path = 'libraries/slick-carousel';
        if (!is_file($this->root . '/' . $path . '/slick/slick.min.js')) {
          $path = 'libraries/slick';
        }
      }
    }
    if (isset($path) && is_file($this->root . '/' . $path . '/slick/slick.min.js')) {
      $library_path = $path;
    }
    $this->slickPath = $library_path;
  }
  return $this->slickPath;
}