forked from drupal-media/entity_browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity_browser.api.php
66 lines (58 loc) · 1.84 KB
/
entity_browser.api.php
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
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* @file
* Hooks related to entity browser and it's plugins.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Alter the information provided in \Drupal\entity_browser\Annotation\EntityBrowserDisplay.
*
* @param $displays
* The array of display plugins, keyed on the machine-readable name.
*/
function hook_entity_browser_display_info_alter(&$displays) {
$displays['modal_display']['label'] = t('Superb fancy stuff!');
}
/**
* Alter the information provided in \Drupal\entity_browser\Annotation\EntityBrowserWidget.
*
* @param $widgets
* The array of widget plugins, keyed on the machine-readable name.
*/
function hook_entity_browser_widget_info_alter(&$widgets) {
$widgets['view_widget']['label'] = t('Views FTW!');
}
/**
* Alter the information provided in \Drupal\entity_browser\Annotation\SelectionDisplay.
*
* @param $widgets
* The array of selection display plugins, keyed on the machine-readable name.
*/
function hook_entity_browser_selection_display_info_alter(&$selection_displays) {
$selection_displays['no_selection']['label'] = t('Nothing!');
}
/**
* Alter the information provided in \Drupal\entity_browser\Annotation\EntityBrowserWidgetSelector.
*
* @param $widget_selectors
* The array of widget selector plugins, keyed on the machine-readable name.
*/
function hook_entity_browser_widget_selector_info_alter(&$widgets) {
$widgets['tab_selector']['label'] = t('Tabs are for winners');
}
/**
* Alter the information provided in \Drupal\entity_browser\Annotation\EntityBrowserFieldWidgetDisplay.
*
* @param $field_displays
* The array of field widget display plugins, keyed on the machine-readable
* name.
*/
function hook_entity_browser_field_widget_display_info_alter(&$field_displays) {
$field_displays['rendered_entity']['label'] = t('Entity render system FTW');
}
/**
* @} End of "addtogroup hooks".
*/