public function GridStackSkinManager::attach in GridStack 8.2
Provides gridstack skins and libraries.
File
- src/
GridStackSkinManager.php, line 54
Class
- GridStackSkinManager
- Implements GridStackSkinManagerInterface.
Namespace
Drupal\gridstackCode
public function attach(array &$load, array $attach = []) {
// Skins may be available for JS, or CSS layouts, or even ungridstack.
if (isset($attach['skin']) && ($skin = $attach['skin'])) {
$skins = $this
->getSkins();
$provider = isset($skins[$skin]['provider']) ? $skins[$skin]['provider'] : 'gridstack';
$load['library'][] = 'gridstack/' . $provider . '.' . $skin;
}
}