function hook_paragraphs_behavior_info_alter

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 paragraphs/src/ParagraphsBehaviorManager.php
Constructs a ParagraphsBehaviorManager object.

File

paragraphs/paragraphs.api.php, line 23
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');
}