-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinline_entity_form_preset.module
54 lines (49 loc) · 1.81 KB
/
inline_entity_form_preset.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
use Drupal\Core\Field\WidgetInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\inline_entity_form_preset\InlineEntityFormPreset;
/**
* Implements hook_field_widget_settings_summary_alter().
*
* @param $summary
* @param $context
*/
function inline_entity_form_preset_field_widget_settings_summary_alter(&$summary, $context) {
InlineEntityFormPreset::alterWidgetSettingsSummary($summary, $context);
}
/**
* Implements hook_field_widget_third_party_settings_form().
*
* @param \Drupal\Core\Field\WidgetInterface $plugin
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* @param $form_mode
* @param $form
* @param \Drupal\Core\Form\FormStateInterface $form_state
*
* @return array
*/
function inline_entity_form_preset_field_widget_third_party_settings_form(WidgetInterface $plugin, FieldDefinitionInterface $field_definition, $form_mode, $form, FormStateInterface $form_state) {
return InlineEntityFormPreset::widgetSettingsForm($plugin, $field_definition, $form_mode, $form, $form_state);
}
/**
* Implements hook_form_FORM_ID_alter().
*
* @param $form
* @param \Drupal\Core\Form\FormStateInterface $form_state
*/
function inline_entity_form_preset_form_entity_form_display_edit_form_alter(&$form, FormStateInterface $form_state) {
InlineEntityFormPreset::alterEntityFormDisplayForm($form, $form_state);
}
/**
* Implements hook_field_widget_WIDGET_TYPE_form_alter().
*
* @param $element
* @param \Drupal\Core\Form\FormStateInterface $form_state
* @param $context
*
* @see hook_field_widget_form_alter()
*/
function inline_entity_form_preset_field_widget_inline_entity_form_complex_form_alter(&$element, FormStateInterface $form_state, $context) {
InlineEntityFormPreset::alterWidgetForm($element, $form_state, $context);
}