Bootstrap3.php in GridStack 8.2
File
src/Plugin/gridstack/engine/Bootstrap3.php
View source
<?php
namespace Drupal\gridstack\Plugin\gridstack\engine;
use Drupal\gridstack\GridStackDefault;
use Symfony\Component\DependencyInjection\ContainerInterface;
class Bootstrap3 extends BootstrapBase {
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
$sizes = $instance->sizes ?: GridStackDefault::breakpoints();
array_pop($sizes);
$instance->sizes = $instance
->setSizes($sizes);
return $instance;
}
protected function getVersionClasses() {
$classes = parent::getVersionClasses();
foreach (array_keys($this->sizes) as $size) {
$hidden[] = "hidden-{$size}";
$visible[] = "visible-{$size}";
}
$classes['hidden'] = $hidden;
$classes['visible'] = $visible;
return $classes;
}
}
Classes
Name |
Description |
Bootstrap3 |
Provides a GridStack Bootstrap 3 layout engine. |