function ObjectDefinition::__construct

Same name in this branch
  1. 9 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()
Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()
  2. 8.9.x core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php \Drupal\Tests\Component\Annotation\Plugin\Discovery\ObjectDefinition::__construct()
  3. 10 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()
  4. 10 core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php \Drupal\Tests\Component\Annotation\Plugin\Discovery\ObjectDefinition::__construct()
  5. 10 core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php \Drupal\Tests\Component\Plugin\Discovery\ObjectDefinition::__construct()
  6. 11.x core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\ObjectDefinition::__construct()
  7. 11.x core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php \Drupal\Tests\Component\Annotation\Plugin\Discovery\ObjectDefinition::__construct()
  8. 11.x core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php \Drupal\Tests\Component\Plugin\Discovery\ObjectDefinition::__construct()

ObjectDefinition constructor.

Parameters

array $definition: An array of definition values.

File

core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php, line 66

Class

ObjectDefinition

Namespace

Drupal\Tests\Component\Annotation\Plugin\Discovery

Code

public function __construct(array $definition) {
    foreach ($definition as $property => $value) {
        $this->{$property} = $value;
    }
}

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