You are here

public function View::postCreate in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::postCreate()
  2. 10 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::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/modules/views/src/Entity/View.php, line 440

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function postCreate(EntityStorageInterface $storage) {
  parent::postCreate($storage);
  $this
    ->mergeDefaultDisplaysOptions();
}