class TestEntityFormInjected in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityFormInjected
Provides a test entity form that uses injection.
Hierarchy
- class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\Tests\Core\Entity\TestEntityForm
- class \Drupal\Tests\Core\Entity\TestEntityFormInjected implements ContainerInjectionInterface
- class \Drupal\Tests\Core\Entity\TestEntityForm
Expanded class hierarchy of TestEntityFormInjected
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 495 - Contains \Drupal\Tests\Core\Entity\EntityTypeManagerTest.
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
public | function | 2 | |
EntityHandlerBase:: |
protected | function | Gets the module handler. | 5 |
EntityHandlerBase:: |
public | function | Sets the module handler for this handler. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
TestEntityForm:: |
protected | property | The entity type manager. | |
TestEntityForm:: |
public | property |
The module handler to invoke hooks on. Overrides EntityHandlerBase:: |
|
TestEntityForm:: |
public | property |
The string translation service. Overrides StringTranslationTrait:: |
|
TestEntityForm:: |
public | function | ||
TestEntityForm:: |
public | function | ||
TestEntityForm:: |
public | function | ||
TestEntityForm:: |
public | function | ||
TestEntityForm:: |
public | function | ||
TestEntityFormInjected:: |
public | property | The color of the entity type. | |
TestEntityFormInjected:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
TestEntityFormInjected:: |
public | function | Constructs a new TestEntityFormInjected. |