You are here

public function PostViewsData::getViewsData in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  2. 8.2 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  3. 8.3 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  4. 8.4 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  5. 8.5 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  6. 8.6 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  7. 8.7 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  8. 8.8 modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  9. 10.3.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  10. 10.0.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  11. 10.1.x modules/social_features/social_post/src/Entity/PostViewsData.php \Drupal\social_post\Entity\PostViewsData::getViewsData()
  12. 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\Entity

Code

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;
}