
| Current Path : /var/www/html/store/web/modules/contrib/entity_reference_revisions/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/entity_reference_revisions/src/EntityNeedsSaveTrait.php |
<?php
namespace Drupal\entity_reference_revisions;
use Drupal\Core\Entity\EntityStorageInterface;
/**
* Trait for EntityNeedsSaveInterface.
*/
trait EntityNeedsSaveTrait {
/**
* Whether the entity needs to be saved or not.
*
* @var bool
*/
protected $needsSave = FALSE;
/**
* {@inheritdoc}
*/
public function needsSave() {
return $this->needsSave;
}
/**
* {@inheritdoc}
*/
public function setNeedsSave($needs_save) {
$this->needsSave = $needs_save;
}
/**
* {@inheritdoc}
*/
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
parent::postSave($storage, $update);
$this->setNeedsSave(FALSE);
}
}