HeartbeatViewsData.php 559 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Drupal\heartbeat8\Entity;
  3. use Drupal\views\EntityViewsData;
  4. use Drupal\views\EntityViewsDataInterface;
  5. /**
  6. * Provides Views data for Heartbeat entities.
  7. */
  8. class HeartbeatViewsData extends EntityViewsData implements EntityViewsDataInterface {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function getViewsData() {
  13. $data = parent::getViewsData();
  14. $data['heartbeat']['table']['base'] = array(
  15. 'field' => 'id',
  16. 'title' => $this->t('Heartbeat'),
  17. 'help' => $this->t('The Heartbeat ID.'),
  18. );
  19. return $data;
  20. }
  21. }