Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / entity / entity.views.inc
1 <?php
2
3 use Drupal\Core\Entity\ContentEntityInterface;
4 use Drupal\Core\Entity\EntityTypeInterface;
5
6 /**
7  * Implements hook_views_data().
8  */
9 function entity_views_data() {
10   $entity_types = \Drupal::entityTypeManager()->getDefinitions();
11   $entity_types = array_filter($entity_types, function (EntityTypeInterface $entity_type) {
12     return $entity_type->entityClassImplements(ContentEntityInterface::class);
13   });
14
15   $data = [];
16   foreach ($entity_types as $entity_type) {
17     /** @var \Drupal\Core\Entity\EntityTypeInterface $entity_type */
18     $base_table = $entity_type->getBaseTable() ?: $entity_type->id();
19
20     if ($entity_type->hasViewBuilderClass()) {
21       $data[$base_table]['rendered_entity'] = [
22         'field' => [
23           'title' => t('Rendered entity'),
24           'help' => t('Renders an entity in a view mode.'),
25           'id' => 'rendered_entity',
26         ],
27       ];
28     }
29   }
30
31   return $data;
32 }