Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 8 |
| ConfigTestListBuilder | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 8 |
| buildHeader | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
|||
| buildRow | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\config_test\ConfigTestListBuilder. | |
| */ | |
| namespace Drupal\config_test; | |
| use Drupal\Core\Config\Entity\ConfigEntityListBuilder; | |
| use Drupal\Core\Entity\EntityInterface; | |
| /** | |
| * Defines a class to build a listing of ConfigTest entities. | |
| * | |
| * @see \Drupal\config_test\Entity\ConfigTest | |
| */ | |
| class ConfigTestListBuilder extends ConfigEntityListBuilder { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function buildHeader() { | |
| $header['label'] = t('Label'); | |
| $header['id'] = t('Machine name'); | |
| return $header + parent::buildHeader(); | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function buildRow(EntityInterface $entity) { | |
| $row['label'] = $entity->label(); | |
| $row['id'] = $entity->id(); | |
| return $row + parent::buildRow($entity); | |
| } | |
| } |