You are here

public function TestDerivativeDiscoveryWithObject::getDerivativeDefinitions in Drupal 8

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

Parameters

array $base_plugin_definition:

Return value

array

Overrides DeriverInterface::getDerivativeDefinitions

1 call to TestDerivativeDiscoveryWithObject::getDerivativeDefinitions()
TestDerivativeDiscoveryWithObject::getDerivativeDefinition in core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php

File

core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php, line 30

Class

TestDerivativeDiscoveryWithObject
Defines test derivative discovery using an object..

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;
}