public function ContentEntityBase::postCreate in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::postCreate()
- 10 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::postCreate()
Acts on a created entity before hooks are invoked.
Used after the entity is created, but before saving the entity and before any of the presave hooks are invoked.
See the Entity CRUD topic for more information.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
Overrides EntityBase::postCreate
See also
\Drupal\Core\Entity\EntityInterface::create()
File
- core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php, line 284
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\EntityCode
public function postCreate(EntityStorageInterface $storage) {
$this->newRevision = TRUE;
}