You are here

public function EntityTestMulChanged::save in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php \Drupal\entity_test\Entity\EntityTestMulChanged::save()

Saves an entity permanently.

When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported.

Return value

int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.

Throws

\Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown.

Overrides Entity::save

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php, line 73
Contains \Drupal\entity_test\Entity\EntityTestMulChanged.

Class

EntityTestMulChanged
Defines the test entity class.

Namespace

Drupal\entity_test\Entity

Code

public function save() {

  // Ensure a new timestamp.
  sleep(1);
  parent::save();
}