You are here

class SlickSkinTest in Slick Carousel 8

Same name and namespace in other branches
  1. 7.3 tests/modules/slick_test/src/SlickSkinTest.php \Drupal\slick_test\SlickSkinTest

Implements SlickSkinInterface as registered via hook_slick_skins_info().

Hierarchy

Expanded class hierarchy of SlickSkinTest

File

tests/modules/slick_test/src/SlickSkinTest.php, line 11

Namespace

Drupal\slick_test
View source
class SlickSkinTest implements SlickSkinInterface {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  public function skins() {
    $path = base_path() . drupal_get_path('module', 'slick_test');
    $skins = [
      'test' => [
        'name' => 'Test',
        'description' => $this
          ->t('Test slick skins.'),
        'group' => 'main',
        'provider' => 'slick_test',
        'css' => [
          'theme' => [
            $path . '/css/slick.theme--test.css' => [],
          ],
        ],
        'options' => [
          'zoom' => TRUE,
        ],
      ],
    ];
    return $skins;
  }

  /**
   * {@inheritdoc}
   */
  public function arrows() {
    $path = base_path() . drupal_get_path('module', 'slick_test');
    $skins = [
      'arrows' => [
        'name' => 'Arrows',
        'description' => $this
          ->t('Test slick arrows.'),
        'provider' => 'slick_test',
        'group' => 'arrows',
        'css' => [
          'theme' => [
            $path . '/css/slick.theme--arrows.css' => [],
          ],
        ],
      ],
    ];
    return $skins;
  }

  /**
   * {@inheritdoc}
   */
  public function dots() {
    $path = base_path() . drupal_get_path('module', 'slick_test');
    $skins = [
      'dots' => [
        'name' => 'Dots',
        'description' => $this
          ->t('Test slick dots.'),
        'provider' => 'slick_test',
        'group' => 'dots',
        'css' => [
          'theme' => [
            $path . '/css/slick.theme--dots.css' => [],
          ],
        ],
      ],
    ];
    return $skins;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SlickSkinTest::arrows public function
SlickSkinTest::dots public function
SlickSkinTest::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.