public function CustomBreadcrumbsListBuilder::buildRow in Custom Breadcrumbs 1.x
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/
CustomBreadcrumbsListBuilder.php, line 28
Class
- CustomBreadcrumbsListBuilder
- Provides a listing of custom breadcrumbs.
Namespace
Drupal\custom_breadcrumbsCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\custom_breadcrumbs\CustomBreadcrumbsInterface $entity */
$row['label'] = $entity
->label();
$row['entityType'] = $entity
->get('entityType');
$row['entityBundlee'] = $entity
->get('entityBundle');
$row['language'] = $entity
->get('language');
$row['status'] = $entity
->status() ? $this
->t('Enabled') : $this
->t('Disabled');
return $row + parent::buildRow($entity);
}