You are here

public function ConfigEntityBase::save in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::save()
  2. 10 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::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 EntityBase::save

2 calls to ConfigEntityBase::save()
ImageStyle::deleteImageEffect in core/modules/image/src/Entity/ImageStyle.php
Deletes an image effect from this style.
Menu::save in core/modules/system/src/Entity/Menu.php
Saves an entity permanently.
1 method overrides ConfigEntityBase::save()
Menu::save in core/modules/system/src/Entity/Menu.php
Saves an entity permanently.

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php, line 591

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

public function save() {
  $return = parent::save();
  $this->trustedData = FALSE;
  return $return;
}