You are here

public function FlexiformFormEntityManager::clearDeferredSave in Flexiform 8

Clear a deferred save requirement.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to clear.

1 call to FlexiformFormEntityManager::clearDeferredSave()
FlexiformFormEntityManager::saveFormEntities in src/FormEntity/FlexiformFormEntityManager.php
Save the form entities.

File

src/FormEntity/FlexiformFormEntityManager.php, line 173

Class

FlexiformFormEntityManager
Class for form entity managers.

Namespace

Drupal\flexiform\FormEntity

Code

public function clearDeferredSave(EntityInterface $entity) {
  $key = "{$entity->getEntityTypeId()}:{$entity->id()}";
  if (array_key_exists($key, $this->deferredSaves)) {
    unset($this->deferredSaves[$key]);
  }
}