public function PluginBase::getDerivativeId in Service Container 7.2
Same name and namespace in other branches
- 7 lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::getDerivativeId()
Gets the derivative_id of the plugin instance.
Return value
string|null The derivative_id of the plugin instance NULL otherwise.
Overrides DerivativeInspectionInterface::getDerivativeId
File
- lib/
Drupal/ Component/ Plugin/ PluginBase.php, line 84 - Contains \Drupal\Component\Plugin\PluginBase.
Class
- PluginBase
- Base class for plugins wishing to support metadata inspection.
Namespace
Drupal\Component\PluginCode
public function getDerivativeId() {
$plugin_id = $this
->getPluginId();
$derivative_id = NULL;
if (strpos($plugin_id, static::DERIVATIVE_SEPARATOR)) {
list(, $derivative_id) = explode(static::DERIVATIVE_SEPARATOR, $plugin_id, 2);
}
return $derivative_id;
}