public function Paragraph::getAllBehaviorSettings

Gets all the behavior settings.

Return value

array The array of behavior settings.

Overrides ParagraphInterface::getAllBehaviorSettings

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

File

paragraphs/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;
}