You are here

public function TestDerivativeDiscovery::getDerivativeDefinitions in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php \Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery::getDerivativeDefinitions()
  2. 9 core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php \Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery::getDerivativeDefinitions()

File

core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php, line 23

Class

TestDerivativeDiscovery
Defines test derivative discovery.

Namespace

Drupal\Tests\Core\Plugin\Discovery

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $plugins = [];
  for ($i = 0; $i < 2; $i++) {
    $plugins['test_discovery_' . $i] = $base_plugin_definition;
  }
  return $plugins;
}