function MockMenuBlockDeriver::getDerivativeDefinition

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlockDeriver::getDerivativeDefinition()
  2. 10 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlockDeriver::getDerivativeDefinition()
  3. 11.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlockDeriver::getDerivativeDefinition()

Overrides DeriverInterface::getDerivativeDefinition

File

core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php, line 20

Class

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

Namespace

Drupal\plugin_test\Plugin\plugin_test\mock_block

Code

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

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