public function MockMenuBlockDeriver::getDerivativeDefinition

Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinition().

Overrides DerivativeInterface::getDerivativeDefinition

File

drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php, line 22
Definition of Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlockDeriver.

Class

MockMenuBlockDeriver
Mock implementation of DerivativeInterface for the mock menu block plugin.

Namespace

Drupal\plugin_test\Plugin\plugin_test\mock_block

Code

public function getDerivativeDefinition($derivative_id, array $base_plugin_definition) {
  $derivatives = $this
    ->getDerivativeDefinitions($base_plugin_definition);
  if (isset($derivatives[$derivative_id])) {
    return $derivatives[$derivative_id];
  }
}