public function Paragraph::setBehaviorSettings

Sets the behavior settings of a plugin.

Parameters

string $plugin_id: The plugin ID for which to set the settings.

array $settings: The behavior settings from the form.

Overrides ParagraphInterface::setBehaviorSettings

File

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

Class

Paragraph
Defines the Paragraph entity.

Namespace

Drupal\paragraphs\Entity

Code

public function setBehaviorSettings($plugin_id, array $settings) {

  // Get existing behaviors first.
  $this
    ->getAllBehaviorSettings();

  // Set behavior settings fields.
  $this->unserializedBehaviorSettings[$plugin_id] = $settings;
}