You are here

public function ViewUI::enforceIsNew in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::enforceIsNew()
  2. 10 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::enforceIsNew()

Enforces an entity to be new.

Allows migrations to create entities with pre-defined IDs by forcing the entity to be new before saving.

Parameters

bool $value: (optional) Whether the entity should be forced to be new. Defaults to TRUE.

Return value

$this

Overrides EntityInterface::enforceIsNew

See also

\Drupal\Core\Entity\EntityInterface::isNew()

File

core/modules/views_ui/src/ViewUI.php, line 1035

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function enforceIsNew($value = TRUE) {
  return $this->storage
    ->enforceIsNew($value);
}