public function LayoutListBuilder::buildRow in Bootstrap Layout Builder 2.x
Same name and namespace in other branches
- 1.x src/LayoutListBuilder.php \Drupal\bootstrap_layout_builder\LayoutListBuilder::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/
LayoutListBuilder.php, line 41
Class
- LayoutListBuilder
- Defines a class to build bootstrap_layout_builder layout entities.
Namespace
Drupal\bootstrap_layout_builderCode
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['id'] = $entity
->id();
$row['number_of_columns'] = $entity
->getNumberOfColumns();
return $row + parent::buildRow($entity);
}