Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
TelephoneContactDetail | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
label | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Drupal\crm\Entity\ContactDetail; |
6 | |
7 | /** |
8 | * A bundle class for crm_contact_detail entities. |
9 | */ |
10 | final class TelephoneContactDetail extends ContactDetailBase { |
11 | |
12 | /** |
13 | * {@inheritdoc} |
14 | */ |
15 | public function label() { |
16 | $type = parent::label(); |
17 | |
18 | $label = $this->get('telephone')->first(); |
19 | |
20 | if ($type) { |
21 | $label = "$type: $label"; |
22 | } |
23 | |
24 | return $label; |
25 | } |
26 | |
27 | } |