public function Paragraph::preSave

File

paragraphs/src/Entity/Paragraph.php, line 177

Class

Paragraph
Defines the Paragraph entity.

Namespace

Drupal\paragraphs\Entity

Code

public function preSave(EntityStorageInterface $storage) {
  parent::preSave($storage);

  // If behavior settings are not set then get them from the entity.
  if ($this->unserializedBehaviorSettings !== NULL) {
    $this
      ->set('behavior_settings', serialize($this->unserializedBehaviorSettings));
  }
}