Further modules included.
[yaffs-website] / web / modules / contrib / entity_browser / entity_browser.views.inc
1 <?php
2
3 /**
4  * @file
5  * Provide views data for entity_browser.module.
6  */
7
8 /**
9  * Implements hook_views_data_alter().
10  */
11 function entity_browser_views_data_alter(&$data) {
12   foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_name => $entity_type) {
13     if ($base_table = $entity_type->getBaseTable()) {
14       $entity_keys = $entity_type->get('entity_keys');
15       $data[$base_table]['entity_browser_select'] = [
16         'title' => t('Entity browser bulk select form'),
17         'help' => t('Add a form element that lets you use a view as a base to select entities in entity browser.'),
18         'field' => [
19           'id' => 'entity_browser_select',
20           'real field' => $entity_keys['id'],
21         ],
22       ];
23     }
24   }
25 }