public static function Entity::preCreate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/Entity.php \Drupal\Core\Entity\Entity::preCreate()
Changes the values of an entity before it is created.
Load defaults for example.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
mixed[] $values: An array of values to set, keyed by property name. If the entity type has bundles the bundle key has to be specified.
Overrides EntityInterface::preCreate
2 calls to Entity::preCreate()
- EntityTest::preCreate in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTest.php - Changes the values of an entity before it is created.
- View::preCreate in core/
modules/ views/ src/ Entity/ View.php - Changes the values of an entity before it is created.
6 methods override Entity::preCreate()
- Comment::preCreate in core/
modules/ comment/ src/ Entity/ Comment.php - Changes the values of an entity before it is created.
- EntityTest::preCreate in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTest.php - Changes the values of an entity before it is created.
- Feed::preCreate in core/
modules/ aggregator/ src/ Entity/ Feed.php - Changes the values of an entity before it is created.
- File::preCreate in core/
modules/ file/ src/ Entity/ File.php - Changes the values of an entity before it is created.
- MenuLinkContent::preCreate in core/
modules/ menu_link_content/ src/ Entity/ MenuLinkContent.php - Changes the values of an entity before it is created.
File
- core/
lib/ Drupal/ Core/ Entity/ Entity.php, line 427 - Contains \Drupal\Core\Entity\Entity.
Class
- Entity
- Defines a base entity class.
Namespace
Drupal\Core\EntityCode
public static function preCreate(EntityStorageInterface $storage, array &$values) {
}