You are here

class SlickSkin in Slick Carousel 8

Same name and namespace in other branches
  1. 8.2 src/SlickSkin.php \Drupal\slick\SlickSkin
  2. 7.3 src/SlickSkin.php \Drupal\slick\SlickSkin

Implements SlickSkinInterface.

Hierarchy

Expanded class hierarchy of SlickSkin

File

src/SlickSkin.php, line 10

Namespace

Drupal\slick
View source
class SlickSkin implements SlickSkinInterface {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  public function skins() {
    $skins = [
      'default' => [
        'name' => 'Default',
        'css' => [
          'theme' => [
            'css/theme/slick.theme--default.css' => [],
          ],
        ],
      ],
      'asnavfor' => [
        'name' => 'Thumbnail: asNavFor',
        'css' => [
          'theme' => [
            'css/theme/slick.theme--asnavfor.css' => [],
          ],
        ],
        'description' => $this
          ->t('Affected thumbnail navigation only.'),
      ],
      'classic' => [
        'name' => 'Classic',
        'description' => $this
          ->t('Adds dark background color over white caption, only good for slider (single slide visible), not carousel (multiple slides visible), where small captions are placed over images.'),
        'css' => [
          'theme' => [
            'css/theme/slick.theme--classic.css' => [],
          ],
        ],
      ],
      'fullscreen' => [
        'name' => 'Full screen',
        'description' => $this
          ->t('Adds full screen display, works best with 1 slidesToShow.'),
        'css' => [
          'theme' => [
            'css/theme/slick.theme--full.css' => [],
            'css/theme/slick.theme--fullscreen.css' => [],
          ],
        ],
      ],
      'fullwidth' => [
        'name' => 'Full width',
        'description' => $this
          ->t('Adds .slide__constrained wrapper to hold caption overlay within the max-container.'),
        'css' => [
          'theme' => [
            'css/theme/slick.theme--full.css' => [],
            'css/theme/slick.theme--fullwidth.css' => [],
          ],
        ],
      ],
      'grid' => [
        'name' => 'Grid Foundation',
        'description' => $this
          ->t('Use slidesToShow > 1 to have more grid combination, only if you have considerable amount of grids, otherwise 1.'),
        'css' => [
          'theme' => [
            'css/theme/slick.theme--grid.css' => [],
          ],
        ],
      ],
      'split' => [
        'name' => 'Split',
        'description' => $this
          ->t('Puts image and caption side by side, requires any split layout option.'),
        'css' => [
          'theme' => [
            'css/theme/slick.theme--split.css' => [],
          ],
        ],
      ],
    ];
    foreach ($skins as $key => $skin) {
      $skins[$key]['group'] = $key == 'asnavfor' ? 'thumbnail' : 'main';
      $skins[$key]['provider'] = 'slick';
    }
    return $skins;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SlickSkin::skins public function Returns the Slick skins. Overrides SlickSkinInterface::skins
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.