Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / EntityTestViewsData.php
1 <?php
2
3 namespace Drupal\entity_test;
4
5 use Drupal\Component\Utility\NestedArray;
6 use Drupal\views\EntityViewsData;
7
8 /**
9  * Provides a view to override views data for test entity types.
10  */
11 class EntityTestViewsData extends EntityViewsData {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getViewsData() {
17     $views_data = parent::getViewsData();
18
19     if ($this->entityType->id() != 'entity_test') {
20       return $views_data;
21     }
22
23     $views_data = NestedArray::mergeDeep($views_data, \Drupal::state()->get('entity_test.views_data', []));
24
25     return $views_data;
26   }
27
28 }