function ContentEntityBase::postCreate

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::postCreate()
  2. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::postCreate()
  3. 11.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::postCreate()

Overrides EntityBase::postCreate

1 call to ContentEntityBase::postCreate()
EntityTestBundleClass::postCreate in core/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php
Acts on a created entity before hooks are invoked.
1 method overrides ContentEntityBase::postCreate()
EntityTestBundleClass::postCreate in core/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestBundleClass.php
Acts on a created entity before hooks are invoked.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 296

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function postCreate(EntityStorageInterface $storage) {
    $this->newRevision = TRUE;
}

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