You are here

ActivityViewsData.php in Open Social 10.3.x

File

modules/custom/activity_creator/src/Entity/ActivityViewsData.php
View source
<?php

namespace Drupal\activity_creator\Entity;

use Drupal\views\EntityViewsData;
use Drupal\views\EntityViewsDataInterface;

/**
 * Provides Views data for Activity entities.
 */
class ActivityViewsData extends EntityViewsData implements EntityViewsDataInterface {

  /**
   * {@inheritdoc}
   */
  public function getViewsData() {
    $data = parent::getViewsData();
    $data['activity_field_data']['table']['base'] = [
      'field' => 'id',
      'title' => $this
        ->t('Activity'),
      'help' => $this
        ->t('The Activity ID.'),
    ];
    return $data;
  }

}

Classes

Namesort descending Description
ActivityViewsData Provides Views data for Activity entities.