function EntityTestViewsHooks::viewsDataAlter
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/entity_test/src/Hook/EntityTestViewsHooks.php \Drupal\entity_test\Hook\EntityTestViewsHooks::viewsDataAlter()
Implements hook_views_data_alter().
Attributes
#[Hook('views_data_alter')]
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Hook/ EntityTestViewsHooks.php, line 17
Class
- EntityTestViewsHooks
- Hook implementations for entity_test.
Namespace
Drupal\entity_test\HookCode
public function viewsDataAlter(&$data) : void {
$data['entity_test']['name_alias'] = $data['entity_test']['name'];
$data['entity_test']['name_alias']['field']['real field'] = 'name';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.