function hook_paragraphs_widget_actions_alter in Paragraphs 8
Alter paragraphs widget.
Parameters
array $widget_actions: Array with actions and dropdown widget actions.
array $context: An associative array containing the following key-value pairs:
- form: The form structure to which widgets are being attached. This may be a full form structure, or a sub-element of a larger form.
- widget: The widget plugin instance.
- items: The field values, as a \Drupal\Core\Field\FieldItemListInterface object.
- delta: The order of this item in the array of subelements (0, 1, 2, etc).
- element: A form element array containing basic properties for the widget.
- form_state: The current state of the form.
- paragraphs_entity: the paragraphs entity for this widget. Might be unsaved, if we have just added a new item to the widget.
- is_translating: Boolean if the widget is translating.
- allow_reference_changes: Boolean if changes to structure are OK.
2 functions implement hook_paragraphs_widget_actions_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- paragraphs_library_paragraphs_widget_actions_alter in modules/
paragraphs_library/ paragraphs_library.module - Implements hook_paragraphs_widget_actions_alter().
- paragraphs_test_paragraphs_widget_actions_alter in tests/
modules/ paragraphs_test/ paragraphs_test.module - Implements hook_paragraphs_widget_actions_alter().
1 invocation of hook_paragraphs_widget_actions_alter()
- ParagraphsWidget::formElement in src/
Plugin/ Field/ FieldWidget/ ParagraphsWidget.php - Uses a similar approach to populate a new translation.
File
- ./
paragraphs.api.php, line 47 - Hooks and documentation related to paragraphs module.
Code
function hook_paragraphs_widget_actions_alter(array &$widget_actions, array &$context) {
}