You are here

public function GridStackPluginManagerBase::load in GridStack 8.2

Returns an instance of a plugin given a plugin id.

Parameters

string $id: The plugin id.

array $configuration: The optional configuration.

Return value

object Return instance of GridStack plugin.

Overrides GridStackPluginManagerInterface::load

2 calls to GridStackPluginManagerBase::load()
GridStackEngineManager::framework in src/GridStackEngineManager.php
GridStackStylizer::loadStyle in src/GridStackStylizer.php

File

src/GridStackPluginManagerBase.php, line 98

Class

GridStackPluginManagerBase
Implements GridStackPluginManagerInterface.

Namespace

Drupal\gridstack

Code

public function load($plugin_id, array $configuration = []) {
  return $plugin_id && $this
    ->hasDefinition($plugin_id) ? $this
    ->createInstance($plugin_id, $configuration) : NULL;
}