public function FileTypeListBuilder::buildRow in File Entity (fieldable files) 8.2
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/
FileTypeListBuilder.php, line 32
Class
- FileTypeListBuilder
- Builds a list of file types.
Namespace
Drupal\file_entityCode
public function buildRow(EntityInterface $entity) {
/** @var FileType $entity */
$row['label'] = array(
'data' => $entity
->label(),
'class' => array(
'menu-label',
),
);
$row['description']['data'] = [
'#markup' => $entity
->getDescription(),
];
$row['status'] = $entity
->status() ? t('Enabled') : t('Disabled');
return $row + parent::buildRow($entity);
}