public function GridBuilder::getDerivativeDefinitions in Grid builder 8
Implements DerivativeInterface::getDerivativeDefinitions().
1 call to GridBuilder::getDerivativeDefinitions()
- GridBuilder::getDerivativeDefinition in lib/
Drupal/ gridbuilder/ Plugin/ Derivative/ GridBuilder.php - Implements DerivativeInterface::getDerivativeDefinition().
File
- lib/
Drupal/ gridbuilder/ Plugin/ Derivative/ GridBuilder.php, line 41 - Definition of Drupal\gridbuilder\Plugin\Derivative\GridBuilder.
Class
- GridBuilder
- GridBuilder plugin derivative definition.
Namespace
Drupal\gridbuilder\Plugin\DerivativeCode
public function getDerivativeDefinitions(array $base_plugin_definition) {
// Use module_invoke() because plugins are active even if the module is not
// enabled.
$this->derivatives = array();
$grids = module_invoke('gridbuilder', 'load_all');
if (!empty($grids)) {
foreach ($grids as $key => $grid) {
$this->derivatives[$key] = array(
'grid' => $grid,
'class' => 'Drupal\\gridbuilder\\Plugin\\gridbuilder\\gridbuilder\\EqualColumnGrid',
);
}
}
return $this->derivatives;
}