You are here

trait SlickExampleSkinTrait in Slick extras 8

A Trait common during transition from hook_hook_info to plugin system.

@todo deprecate and remove at slick:9.x-1.0, not slick:8.x-3.0.

Hierarchy

See also

https://www.drupal.org/node/3105648

1 file declares its use of SlickExampleSkinTrait
SlickExampleSkin.php in slick_example/src/Plugin/slick/SlickExampleSkin.php

File

slick_example/src/SlickExampleSkinTrait.php, line 11

Namespace

Drupal\slick_example
View source
trait SlickExampleSkinTrait {

  /**
   * Sets the slick skins.
   */
  protected function definedSkins() {
    $path = base_path() . drupal_get_path('module', 'slick_example');
    $skins = [
      'x_testimonial' => [
        'name' => 'X: Testimonial',
        'description' => $this
          ->t('Testimonial with thumbnail and description with slidesToShow 2.'),
        'group' => 'main',
        'provider' => 'slick_example',
        'css' => [
          'theme' => [
            $path . '/css/slick.theme--x-testimonial.css' => [],
          ],
        ],
      ],
    ];
    return $skins;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SlickExampleSkinTrait::definedSkins protected function Sets the slick skins.