Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| UserContactMappingViewBuilder | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| getBuildDefaults | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Drupal\crm; |
| 4 | |
| 5 | use Drupal\Core\Entity\EntityInterface; |
| 6 | use Drupal\Core\Entity\EntityViewBuilder; |
| 7 | |
| 8 | /** |
| 9 | * Provides a view controller for a user contact mapping entity type. |
| 10 | */ |
| 11 | class UserContactMappingViewBuilder extends EntityViewBuilder { |
| 12 | |
| 13 | /** |
| 14 | * {@inheritdoc} |
| 15 | */ |
| 16 | protected function getBuildDefaults(EntityInterface $entity, $view_mode) { |
| 17 | $build = parent::getBuildDefaults($entity, $view_mode); |
| 18 | // The relation has no entity template itself. |
| 19 | unset($build['#theme']); |
| 20 | return $build; |
| 21 | } |
| 22 | |
| 23 | } |