8.5.x PluginBase.php PluginBase::getBaseId()
8.0.x PluginBase.php PluginBase::getBaseId()
8.1.x PluginBase.php PluginBase::getBaseId()
8.2.x PluginBase.php PluginBase::getBaseId()
8.3.x PluginBase.php PluginBase::getBaseId()
8.4.x PluginBase.php PluginBase::getBaseId()
8.6.x PluginBase.php PluginBase::getBaseId()

Gets the base_plugin_id of the plugin instance.

Return value

string The base_plugin_id of the plugin instance.

Overrides DerivativeInspectionInterface::getBaseId

File

core/lib/Drupal/Component/Plugin/PluginBase.php, line 69

Class

PluginBase
Base class for plugins wishing to support metadata inspection.

Namespace

Drupal\Component\Plugin

Code

public function getBaseId() {
  $plugin_id = $this
    ->getPluginId();
  if (strpos($plugin_id, static::DERIVATIVE_SEPARATOR)) {
    list($plugin_id) = explode(static::DERIVATIVE_SEPARATOR, $plugin_id, 2);
  }
  return $plugin_id;
}