You are here

public function MenuLinkContent::getDerivativeId in Multiversion 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Menu/MenuLinkContent.php \Drupal\multiversion\Plugin\Menu\MenuLinkContent::getDerivativeId()

Gets the derivative_id of the plugin instance.

Return value

string|null The derivative_id of the plugin instance NULL otherwise.

Overrides PluginBase::getDerivativeId

File

src/Plugin/Menu/MenuLinkContent.php, line 23

Class

MenuLinkContent

Namespace

Drupal\multiversion\Plugin\Menu

Code

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, 3);
  }
  return $derivative_id;
}