GridStackEngineManager.php in GridStack 8.2
File
src/GridStackEngineManager.php
View source
<?php
namespace Drupal\gridstack;
class GridStackEngineManager extends GridStackPluginManagerBase implements GridStackEngineManagerInterface {
protected static $path = 'Plugin/gridstack/engine';
protected static $interface = 'Drupal\\gridstack\\GridStackEnginePluginInterface';
protected static $annotation = 'Drupal\\gridstack\\Annotation\\GridStackEngine';
protected static $key = 'gridstack_engine';
protected $framework;
protected $classOptions;
public function attach(array &$load, array $attach = []) {
if (isset($attach['_engine']) && ($engine = $attach['_engine'])) {
$this
->load($engine, $attach)
->attach($load, $attach);
}
}
public function framework(array $configuration = []) {
if (!isset($this->framework)) {
if ($framework = $this
->config('framework')) {
$this->framework = $this
->load($framework, $configuration);
}
}
return $this->framework;
}
public function getClassOptions($type = 'generic') {
if (!isset($this->classOptions[$type])) {
if ($this
->framework()) {
$this->classOptions[$type] = $type == 'row' ? $this
->framework()
->rowClassOptions() : $this
->framework()
->classOptions();
}
}
return $this->classOptions[$type];
}
}