You are here

public function GridStackManager::getEngine in GridStack 8.2

Returns the layout engine.

File

src/GridStackManager.php, line 143

Class

GridStackManager
Implements GridStackManagerInterface.

Namespace

Drupal\gridstack

Code

public function getEngine(array $settings, $engine = NULL) {
  if (!isset($this->engine) || $engine) {
    if (empty($engine)) {
      $engine = empty($settings['_engine']) ? $this
        ->getEngineId() : $settings['_engine'];
    }
    $this->engine = $this->engineManager
      ->load($engine, $settings);
  }
  return $this->engine;
}