function PluginBase::getBaseId

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::getBaseId()
  2. 10 core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::getBaseId()
  3. 11.x core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::getBaseId()

Overrides DerivativeInspectionInterface::getBaseId

File

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

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.