EntityTestViewsData.php in Zircon Profile 8.0
Same filename and directory in other branches
Contains \Drupal\entity_test\EntityTestViewsData.
Namespace
Drupal\entity_testFile
core/modules/system/tests/modules/entity_test/src/EntityTestViewsData.phpView source
<?php
/**
* @file
* Contains \Drupal\entity_test\EntityTestViewsData.
*/
namespace Drupal\entity_test;
use Drupal\Component\Utility\NestedArray;
use Drupal\views\EntityViewsData;
/**
* Provides a view to override views data for test entity types.
*/
class EntityTestViewsData extends EntityViewsData {
/**
* {@inheritdoc}
*/
public function getViewsData() {
$views_data = parent::getViewsData();
if ($this->entityType
->id() != 'entity_test') {
return $views_data;
}
$views_data = NestedArray::mergeDeep($views_data, \Drupal::state()
->get('entity_test.views_data', []));
return $views_data;
}
}
Classes
Name | Description |
---|---|
EntityTestViewsData | Provides a view to override views data for test entity types. |