function TestDerivativeDiscoveryWithObject::getDerivativeDefinitions
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: An associative array defining the base plugin.
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 35  
Class
- TestDerivativeDiscoveryWithObject
 - Defines test derivative discovery using an object..
 
Namespace
Drupal\Tests\Core\Plugin\DiscoveryCode
public function getDerivativeDefinitions($base_plugin_definition) {
  $plugins = [];
  for ($i = 0; $i < 2; $i++) {
    $plugins['test_discovery_' . $i] = $base_plugin_definition;
  }
  return $plugins;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.