You are here

function hook_paragraphs_behavior_info_alter in Paragraphs 8

Alter the information provided in \Drupal\paragraphs\Annotation\ParagraphsBehavior.

Parameters

$paragraphs_behavior: The array of paragraphs behavior plugins, keyed on the machine-readable plugin name.

1 invocation of hook_paragraphs_behavior_info_alter()
ParagraphsBehaviorManager::__construct in src/ParagraphsBehaviorManager.php
Constructs a ParagraphsBehaviorManager object.

File

./paragraphs.api.php, line 21
Hooks and documentation related to paragraphs module.

Code

function hook_paragraphs_behavior_info_alter(&$paragraphs_behavior) {

  // Set a new label for the my_layout plugin instead of the one
  // provided in the annotation.
  $paragraphs_behavior['my_layout']['label'] = t('New label');
}