VoteViewsData.php in Voting API 8.3
Namespace
Drupal\votingapi\EntityFile
src/Entity/VoteViewsData.phpView source
<?php
namespace Drupal\votingapi\Entity;
use Drupal\views\EntityViewsData;
use Drupal\views\EntityViewsDataInterface;
/**
* Provides Views data for Vote entities.
*/
class VoteViewsData extends EntityViewsData implements EntityViewsDataInterface {
/**
* {@inheritdoc}
*/
public function getViewsData() {
$data = parent::getViewsData();
$data['votingapi_vote']['table']['base'] = [
'field' => 'id',
'title' => $this
->t('Vote'),
'help' => $this
->t('The Vote ID.'),
];
return $data;
}
}
Classes
Name | Description |
---|---|
VoteViewsData | Provides Views data for Vote entities. |