public function PostViewsData::getViewsData in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.2 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.3 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.4 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.5 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.6 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.7 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 8.8 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 10.3.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 10.0.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 10.1.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
- 10.2.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
Returns views data for the entity type.
Return value
array Views data in the format of hook_views_data().
Overrides EntityViewsData::getViewsData
File
- modules/
social_features/ social_post/ src/ Entity/ PostViewsData.php, line 16
Class
- PostViewsData
- Provides Views data for Post entities.
Namespace
Drupal\social_post\EntityCode
public function getViewsData() {
$data = parent::getViewsData();
$data['post_field_data']['table']['base'] = [
'field' => 'id',
'title' => $this
->t('Post'),
'help' => $this
->t('The Post ID.'),
];
return $data;
}