public static function GridStackEnginePluginBase::create in GridStack 8.2
Creates an instance of the plugin.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
Return value
static Returns an instance of this plugin.
Overrides GridStackPluginBase::create
2 calls to GridStackEnginePluginBase::create()
- Bootstrap3::create in src/
Plugin/ gridstack/ engine/ Bootstrap3.php - Creates an instance of the plugin.
- FoundationBase::create in src/
Plugin/ gridstack/ engine/ FoundationBase.php - Creates an instance of the plugin.
2 methods override GridStackEnginePluginBase::create()
- Bootstrap3::create in src/
Plugin/ gridstack/ engine/ Bootstrap3.php - Creates an instance of the plugin.
- FoundationBase::create in src/
Plugin/ gridstack/ engine/ FoundationBase.php - Creates an instance of the plugin.
File
- src/
GridStackEnginePluginBase.php, line 102
Class
- GridStackEnginePluginBase
- Provides base class for all gridstack layout engines.
Namespace
Drupal\gridstackCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
$instance->stylizer = $container
->get('gridstack.stylizer');
$instance->sizes = $instance
->setSizes(GridStackDefault::breakpoints());
$instance->classOptions = $instance
->setClassOptions();
$instance->rowClassOptions = $instance
->setRowClassOptions();
return $instance;
}