public static function OverrideHelper::pluginClass in Lightning Core 8
Same name and namespace in other branches
- 8.5 src/OverrideHelper.php \Drupal\lightning_core\OverrideHelper::pluginClass()
- 8.2 src/OverrideHelper.php \Drupal\lightning_core\OverrideHelper::pluginClass()
- 8.3 src/OverrideHelper.php \Drupal\lightning_core\OverrideHelper::pluginClass()
- 8.4 src/OverrideHelper.php \Drupal\lightning_core\OverrideHelper::pluginClass()
Overrides the class implementation specified in a plugin definition.
The replacement class is only used if its immediate parent is the class specified by the plugin definition.
Parameters
array $plugin_definition: The plugin definition.
string $replacement_class: The class to use.
1 call to OverrideHelper::pluginClass()
File
- src/
OverrideHelper.php, line 23
Class
- OverrideHelper
- Helps tweak and override implementations of various things.
Namespace
Drupal\lightning_coreCode
public static function pluginClass(array &$plugin_definition, $replacement_class) {
if (get_parent_class($replacement_class) == $plugin_definition['class']) {
$plugin_definition['class'] = $replacement_class;
}
}