public function MiconContentTypeListBuilder::buildRow in Micon 2.x
Same name and namespace in other branches
- 8 micon_content_type/src/MiconContentTypeListBuilder.php \Drupal\micon_content_type\MiconContentTypeListBuilder::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 NodeTypeListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- micon_content_type/
src/ MiconContentTypeListBuilder.php, line 24
Class
- MiconContentTypeListBuilder
- Provides a listing of ContentType.
Namespace
Drupal\micon_content_typeCode
public function buildRow(EntityInterface $entity) {
$icon = micon_content_type_icon($entity);
$row['icon']['data']['#markup'] = $icon ? micon()
->setIcon($icon) : '';
return $row + parent::buildRow($entity);
}