You are here

public function Paragraph::getAllBehaviorSettings in Paragraphs 8

Gets all the behavior settings.

Return value

array The array of behavior settings.

Overrides ParagraphInterface::getAllBehaviorSettings

2 calls to Paragraph::getAllBehaviorSettings()
Paragraph::getBehaviorSetting in src/Entity/Paragraph.php
Gets the behavior setting of an specific plugin.
Paragraph::setBehaviorSettings in src/Entity/Paragraph.php
Sets the behavior settings of a plugin.

File

src/Entity/Paragraph.php, line 189

Class

Paragraph
Defines the Paragraph entity.

Namespace

Drupal\paragraphs\Entity

Code

public function getAllBehaviorSettings() {
  if ($this->unserializedBehaviorSettings === NULL) {
    $this->unserializedBehaviorSettings = unserialize($this
      ->get('behavior_settings')->value);
  }
  if (!is_array($this->unserializedBehaviorSettings)) {
    $this->unserializedBehaviorSettings = [];
  }
  return $this->unserializedBehaviorSettings;
}