public function BreakpointListBuilder::buildRow in Bootstrap Layout Builder 1.x
Same name and namespace in other branches
- 2.x src/BreakpointListBuilder.php \Drupal\bootstrap_layout_builder\BreakpointListBuilder::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 DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
BreakpointListBuilder.php, line 34
Class
- BreakpointListBuilder
- Provides a listing of layout builder breakpoints entities.
Namespace
Drupal\bootstrap_layout_builderCode
public function buildRow(EntityInterface $entity) {
$row = [];
$row['label'] = $entity
->label();
$row['id'] = [
'#plain_text' => $entity
->id(),
];
$row['base_class'] = [
'#plain_text' => $entity
->getBaseClass(),
];
$row['status'] = [
'#plain_text' => $entity
->getStatus() == 1 ? $this
->t('Enabled') : $this
->t('Disabled'),
];
return $row + parent::buildRow($entity);
}