You are here

public function LPStatusViewsData::getViewsData in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x src/Entity/LPStatusViewsData.php \Drupal\opigno_learning_path\Entity\LPStatusViewsData::getViewsData()

Returns views data for the entity type.

Return value

array Views data in the format of hook_views_data().

Overrides EntityViewsData::getViewsData

File

src/Entity/LPStatusViewsData.php, line 15

Class

LPStatusViewsData
Provides Views data for LPStatus entities.

Namespace

Drupal\opigno_learning_path\Entity

Code

public function getViewsData() {
  $data = parent::getViewsData();
  $data['groups']['user_lp_status']['relationship'] = [
    'title' => t('User Learning Path status'),
    'label' => t('User Learning Path status relation'),
    'group' => t('Group content'),
    'help' => t('Relates to the User Learning Path Status entity the group content represents.'),
    'id' => 'standard',
    'base' => 'user_lp_status',
    'base field' => 'gid',
    'field' => 'id',
  ];
  return $data;
}