Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| UserContactViewBuilder | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getBuildDefaults | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| 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 relation entity type. |
| 10 | */ |
| 11 | class UserContactViewBuilder 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 | } |