Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 11 |
Broken | |
0.00% |
0 / 1 |
|
42.86% |
3 / 7 |
56 | |
0.00% |
0 / 11 |
buildConfigurationForm | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
validateConfigurationForm | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
submitConfigurationForm | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
getReferenceableEntities | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
countReferenceableEntities | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
validateReferenceableEntities | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
entityQueryAlter | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\Core\Entity\Plugin\EntityReferenceSelection\Broken. | |
*/ | |
namespace Drupal\Core\Entity\Plugin\EntityReferenceSelection; | |
use Drupal\Core\Database\Query\SelectInterface; | |
use Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Defines a fallback plugin for missing entity_reference selection plugins. | |
* | |
* @EntityReferenceSelection( | |
* id = "broken", | |
* label = @Translation("Broken/Missing") | |
* ) | |
*/ | |
class Broken implements SelectionInterface { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildConfigurationForm(array $form, FormStateInterface $form_state) { | |
$form['selection_handler'] = array( | |
'#markup' => t('The selected selection handler is broken.'), | |
); | |
return $form; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { } | |
/** | |
* {@inheritdoc} | |
*/ | |
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { } | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) { | |
return array(); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') { | |
return 0; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function validateReferenceableEntities(array $ids) { | |
return array(); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function entityQueryAlter(SelectInterface $query) { } | |
} |