public function RedirectViewsData::getViewsData in Redirect 8
Returns views data for the entity type.
Return value
array Views data in the format of hook_views_data().
Overrides EntityViewsData::getViewsData
File
- src/
RedirectViewsData.php, line 15
Class
- RedirectViewsData
- Provides views integration for Redirect entities.
Namespace
Drupal\redirectCode
public function getViewsData() {
$data = parent::getViewsData();
// Views defaults to the 'redirect_source' field that is configured as
// the redirect label. Since this is a composed field, change the default
// field to its 'path' value.
$data['redirect']['table']['base']['defaults']['field'] = 'redirect_source__path';
return $data;
}