TransactionViewsData.php in Transaction 8
File
src/TransactionViewsData.php
View source
<?php
namespace Drupal\transaction;
use Drupal\views\EntityViewsData;
class TransactionViewsData extends EntityViewsData {
public function getViewsData() {
$data = parent::getViewsData();
$data['transaction']['description'] = [
'title' => $this
->t('Description'),
'help' => $this
->t('The transaction description, according to the transaction operation or composed by the transactor when there is no operation.'),
'field' => [
'id' => 'field',
'default_formatter' => 'string',
'field_name' => 'description',
],
];
$data['transaction']['details'] = [
'title' => $this
->t('Details'),
'help' => $this
->t('Additional details of a transaction, according to the transaction operation or composed by the transactor when there is no operation.'),
'field' => [
'id' => 'field',
'default_formatter' => 'string',
'field_name' => 'details',
],
];
$data['transaction']['result_message'] = [
'title' => $this
->t('Result message'),
'help' => $this
->t('A message describing the execution result of the transaction.'),
'field' => [
'id' => 'field',
'default_formatter' => 'string',
'field_name' => 'result_message',
],
];
$data['transaction']['executed']['filter']['allow empty'] = TRUE;
$data['transaction']['result_code']['filter']['allow empty'] = TRUE;
$data['transaction']['executor']['filter']['allow empty'] = TRUE;
return $data;
}
}