Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / entity_reference_revisions / src / EntityNeedsSaveTrait.php
1 <?php
2
3 namespace Drupal\entity_reference_revisions;
4 use Drupal\Core\Entity\EntityStorageInterface;
5
6 /**
7  * Trait for EntityNeedsSaveInterface.
8  */
9 trait EntityNeedsSaveTrait {
10
11   /**
12    * Whether the entity needs to be saved or not.
13    *
14    * @var bool
15    */
16   protected $needsSave = FALSE;
17
18   /**
19    * {@inheritdoc}
20    */
21   public function needsSave() {
22     return $this->needsSave;
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function setNeedsSave($needs_save) {
29     $this->needsSave = $needs_save;
30   }
31
32   /**
33    * {@inheritdoc}
34    */
35   public function postSave(EntityStorageInterface $storage, $update = TRUE) {
36     parent::postSave($storage, $update);
37     $this->setNeedsSave(FALSE);
38   }
39 }