Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / paragraphs / paragraphs.api.php
index 9d8f920cabfccaaf942c5c385f1e7a3131957ae5..359b6eda3f671344ccdb9f281269139b26eb783a 100644 (file)
@@ -24,6 +24,27 @@ function hook_paragraphs_behavior_info_alter(&$paragraphs_behavior) {
   $paragraphs_behavior['my_layout']['label'] = t('New label');
 }
 
+/**
+ * Alter paragraphs widget.
+ *
+ * @param array $widget_actions
+ *   Array with actions and dropdown widget actions.
+ * @param 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.
+ */
+function hook_paragraphs_widget_actions_alter(array &$widget_actions, array &$context) {
+}
+
 /**
  * @} End of "addtogroup hooks".
  */