You are here

public function ObjectDefinition::__construct in Drupal 10

Same name in this branch
  1. 10 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()
  2. 10 core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php \Drupal\Tests\Component\Annotation\Plugin\Discovery\ObjectDefinition::__construct()
Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()
  2. 9 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()

ObjectDefinition constructor.

Parameters

array $definition: An associative array defining the plugin.

File

core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php, line 514

Class

ObjectDefinition

Namespace

Drupal\Tests\Core\Plugin

Code

public function __construct(array $definition) {

  // This class does not exist but plugin definitions must provide a class.
  $this->class = 'PluginObject';
  foreach ($definition as $property => $value) {
    $this->{$property} = $value;
  }
}