ActivityViewsData.php in CRM Core 8.3
File
modules/crm_core_activity/src/ActivityViewsData.php
View source
<?php
namespace Drupal\crm_core_activity;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\views\EntityViewsData;
class ActivityViewsData extends EntityViewsData {
use StringTranslationTrait;
public function getViewsData() {
$data = parent::getViewsData();
$data['crm_core_activity']['activity_preview'] = [
'title' => $this
->t('Activity preview field'),
'field' => [
'title' => $this
->t('Activity preview'),
'help' => $this
->t('Provide preview of activity'),
'id' => 'activity_preview',
'field' => 'activity_id',
],
];
return $data;
}
}