SmsMessageViewsData.php in SMS Framework 2.1.x
File
src/Views/SmsMessageViewsData.php
View source
<?php
declare (strict_types=1);
namespace Drupal\sms\Views;
use Drupal\views\EntityViewsData;
class SmsMessageViewsData extends EntityViewsData {
public function getViewsData() {
$data = parent::getViewsData();
$data['sms']['direction']['field']['id'] = 'sms_message_direction';
$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;
}
}