class TestEntityFormInjected
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityFormInjected
- 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityFormInjected
- 11.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityFormInjected
Provides a test entity form that uses injection.
Hierarchy
- class \Drupal\Tests\Core\Entity\TestEntityFormInjected extends \Drupal\Tests\Core\Entity\TestEntityForm implements \Drupal\Core\DependencyInjection\ContainerInjectionInterface
Expanded class hierarchy of TestEntityFormInjected
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 558
Namespace
Drupal\Tests\Core\EntityView source
class TestEntityFormInjected extends TestEntityForm implements ContainerInjectionInterface {
/**
* The color of the entity type.
*
* @var string
*/
public $color;
/**
* Constructs a new TestEntityFormInjected.
*
* @param string $color
* The color of the entity type.
*/
public function __construct($color) {
$this->color = $color;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static('yellow');
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.