public function SmsMessageViewsData::getViewsData in SMS Framework 2.1.x
Same name and namespace in other branches
- 8 src/Views/SmsMessageViewsData.php \Drupal\sms\Views\SmsMessageViewsData::getViewsData()
- 2.x src/Views/SmsMessageViewsData.php \Drupal\sms\Views\SmsMessageViewsData::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/
Views/ SmsMessageViewsData.php, line 17
Class
- SmsMessageViewsData
- Provides views data for SMS message entities.
Namespace
Drupal\sms\ViewsCode
public function getViewsData() {
$data = parent::getViewsData();
// Direction field.
$data['sms']['direction']['field']['id'] = 'sms_message_direction';
// Recipient phone numbers.
$data['sms__recipient_phone_number']['table']['join'] = [
'sms' => [
'left_field' => 'id',
'field' => 'entity_id',
],
];
$data['sms__recipient_phone_number']['table']['group'] = $this
->t('SMS Message');
$data['sms__recipient_phone_number']['table']['provider'] = $this->entityType
->getProvider();
return $data;
}