Change record status: 
Project: 
Introduced in branch: 
8.x-2.x
Introduced in version: 
8.x-2.0-alpha1
Description: 

The following classes or methods are deprecated in slick:8.x-2.0 and are or to be removed from slick:8.x-3.0 or so for a few reasons such as a transition from Video Embed Field to core Media, clarity, consistency, additional functionality (migrating from hook_hook_info to plugin system), decluttering particular classes:

slick:7.x-3.0 - 8.x-2.0 (Before) slick:8.x-2.1 and or slick:8.x-3.0+ (After)
\Drupal\slick\Plugin\Field\FieldFormatter\SlickFileFormatter \\SlickMediaFormatter
\Drupal\slick\SlickSkin \Drupal\slick\Plugin\slick\SlickSkin
\Drupal\slick\SlickSkinManager
\Drupal\slick\SlickSkinManagerInterface
\Drupal\slick\SlickSkinPluginBase
\Drupal\slick\SlickSkinPluginInterface
\Drupal\slick\Annotation\SlickSkin
\Drupal\slick\SlickManager::attachSkin \Drupal\slick\SlickSkinManager::attachSkin
\Drupal\slick\SlickManager::getSkins \Drupal\slick\SlickSkinManager::getSkins
\Drupal\slick\SlickManager::getSkinsByGroup \Drupal\slick\SlickSkinManager::getSkinsByGroup
\Drupal\slick\SlickManager::getConstantSkins \Drupal\slick\SlickSkinManager::getConstantSkins
\Drupal\slick\SlickManager::libraryInfoBuild \Drupal\slick\SlickSkinManager::libraryInfoBuild
\Drupal\slick\SlickManager::getEasingPath \Drupal\slick\SlickSkinManager::getEasingPath
\Drupal\slick\Entity\Slick::getHtmlId() \Drupal\blazy\Blazy::getHtmlId()

API changes

https://git.drupalcode.org/project/slick/blob/8.x-2.x/slick.api.php#L341

Registering a Slick skin:

slick:7.x-3.0 - 8.x-2.0 (Before) slick:8.x-2.1+ (After)
To register a skin:
  • implement hook_slick_skins_info() in a module file,
  • and defines skins at the registered class which implements SlickSkinInterface.

The class must implement \Drupal\slick\SlickSkinInterface, and it has 3 supported methods: ::skins(), ::dots(), ::arrows() to have skin options for main/thumbnail/overlay/nested displays, dots, and arrows skins respectively.

  • @see \Drupal\slick\SlickSkinInterface
  • @see \Drupal\slick_example\SlickExampleSkin
  • @see \Drupal\slick_extras\SlickExtrasSkin
To register a skin:
  • copy \Drupal\slick\Plugin\slick\SlickSkin into your module /src/Plugin/slick directory.
  • Adjust everything accordingly: rename the file, change SlickSkin ID and label, change class name and its namespace, define skin name, and its CSS and JS assets.

The SlickSkin object has 3 supported methods: ::setSkins(), ::setDots(), ::setArrows() to have skin options for main/thumbnail/overlay displays, dots, and arrows skins respectively.

The method bodies (the array structure of skin definitions) are similar to previous ones, no changes.

  • @see \Drupal\slick\SlickSkinPluginInterface
  • @see \Drupal\slick_example\Plugin\slick\SlickExampleSkin
  • @see \Drupal\slick_extras\Plugin\slick\SlickExtrasSkin

During transition, a new option is provided which can be toggled at Slick UI:

  • Disable deprecated skins

Depending on your needs. Leave it unchecked if things are broken, or (y/our) sub-modules are not updated with the new plugin system, yet. If you are sure things are not broken, or never register a skin nor using Slick examples, you can check this to reduce extra join. At any rate, skins are permanently cached once, so should not impact much.

Important!
Skins are permanently cached. If you don't see any newly added skins via y/our sub-modules, be sure to clear cache.

Impacts: 
Site builders, administrators, editors
Module developers
Themers
Site templates, recipes and distribution developers