public function WebformElementManager::removeExcludeDefinitions in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementManager.php \Drupal\webform\Plugin\WebformElementManager::removeExcludeDefinitions()
Remove excluded plugin definitions.
Parameters
array $definitions: The plugin definitions to filter.
Return value
array An array of plugin definitions with excluded plugins removed.
Overrides WebformPluginManagerExcludedInterface::removeExcludeDefinitions
1 call to WebformElementManager::removeExcludeDefinitions()
- WebformElementManager::getInstances in src/
Plugin/ WebformElementManager.php - Get all available webform element plugin instances.
File
- src/
Plugin/ WebformElementManager.php, line 326
Class
- WebformElementManager
- Provides a plugin manager for webform element plugins.
Namespace
Drupal\webform\PluginCode
public function removeExcludeDefinitions(array $definitions) {
$definitions = isset($definitions) ? $definitions : $this
->getDefinitions();
$excluded = $this->configFactory
->get('webform.settings')
->get('element.excluded_elements');
return $excluded ? array_diff_key($definitions, $excluded) : $definitions;
}