8.5.x PluginBase.php PluginBase::getDerivativeId()
8.0.x PluginBase.php PluginBase::getDerivativeId()
8.1.x PluginBase.php PluginBase::getDerivativeId()
8.2.x PluginBase.php PluginBase::getDerivativeId()
8.3.x PluginBase.php PluginBase::getDerivativeId()
8.4.x PluginBase.php PluginBase::getDerivativeId()
8.6.x PluginBase.php 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

8 calls to PluginBase::getDerivativeId()
BlockContentBlock::blockForm in core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
Overrides \Drupal\Core\Block\BlockBase::blockForm().
BlockContentBlock::getEntity in core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
Loads the block content entity of the block.
LanguageBlock::build in core/modules/language/src/Plugin/Block/LanguageBlock.php
Builds and returns the renderable array for this block plugin.
MenuLinkContent::getUuid in core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php
Returns the unique ID representing the menu link.
SystemMenuBlock::build in core/modules/system/src/Plugin/Block/SystemMenuBlock.php
Builds and returns the renderable array for this block plugin.

... See full list

File

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

Class

PluginBase
Base class for plugins wishing to support metadata inspection.

Namespace

Drupal\Component\Plugin

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