public function WebformCompositeDeriver::getDerivativeDefinitions in Webform Composite Tools 8
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- src/
Plugin/ Derivative/ WebformCompositeDeriver.php, line 46
Class
- WebformCompositeDeriver
- Provides webform element reusable custom webform composite elements.
Namespace
Drupal\webform_composite\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$composites = $this->compositeStorage
->loadMultiple();
foreach ($composites as $composite) {
$this->derivatives[$composite
->id()] = $base_plugin_definition;
$this->derivatives[$composite
->id()]['label'] = $composite
->label();
}
return $this->derivatives;
}