function hook_paragraphs_behavior_info_alter

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


$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.


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


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');