public function MockLayoutBlockDeriver::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/MockLayoutBlockDeriver.php, line 22
Definition of Drupal\plugin_test\Plugin\plugin_test\mock_block\MockLayoutBlockDeriver.

Class

MockLayoutBlockDeriver
Mock implementation of DerivativeInterface for the mock layout 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];
  }
}