public function BrokenLinkListBuilder::buildRow in Broken Link 8.3
Same name and namespace in other branches
- 8 src/BrokenLinkListBuilder.php \Drupal\broken_link\BrokenLinkListBuilder::buildRow()
- 8.2 src/BrokenLinkListBuilder.php \Drupal\broken_link\BrokenLinkListBuilder::buildRow()
Builds a row for an entity in the entity listing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.
Return value
array A render array structure of fields for this entity.
Overrides EntityListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
BrokenLinkListBuilder.php, line 25
Class
- BrokenLinkListBuilder
- Provides a listing of Broken link redirect entity entities.
Namespace
Drupal\broken_linkCode
public function buildRow(EntityInterface $entity) {
foreach ([
'link',
'hits',
] as $column) {
if ($entity
->get($column)
->get(0)) {
$row[$column] = $entity
->get($column)
->get(0)
->getValue()['value'];
}
else {
$row[$column] = '';
}
}
return $row + parent::buildRow($entity);
}