public function EntityTestViewsData::getViewsData in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/entity_test/src/EntityTestViewsData.php \Drupal\entity_test\EntityTestViewsData::getViewsData()
Returns views data for the entity type.
Return value
array Views data in the format of hook_views_data().
Overrides EntityViewsData::getViewsData
File
- core/
modules/ system/ tests/ modules/ entity_test/ src/ EntityTestViewsData.php, line 21 - Contains \Drupal\entity_test\EntityTestViewsData.
Class
- EntityTestViewsData
- Provides a view to override views data for test entity types.
Namespace
Drupal\entity_testCode
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;
}