Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
CrmUserContact | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
ensureTable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addField | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Drupal\crm\Plugin\views\query; |
4 | |
5 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
6 | use Drupal\views\Attribute\ViewsQuery; |
7 | use Drupal\views\Plugin\views\query\QueryPluginBase; |
8 | |
9 | /** |
10 | * Views query plugin for a CRM user. |
11 | */ |
12 | #[ViewsQuery( |
13 | id: 'crm_user_contact', |
14 | title: new TranslatableMarkup('User Contact'), |
15 | help: new TranslatableMarkup('Relationship between the user and person.') |
16 | )] |
17 | class CrmUserContact extends QueryPluginBase { |
18 | |
19 | /** |
20 | * {@inheritdoc} |
21 | */ |
22 | public function ensureTable($table, $relationship = NULL) { |
23 | return ''; |
24 | } |
25 | |
26 | /** |
27 | * {@inheritdoc} |
28 | */ |
29 | public function addField($table, $field, $alias = '', $params = []) { |
30 | return $field; |
31 | } |
32 | |
33 | } |