You are here

public function GroupContentMenuListBuilder::buildRow in Group Content Menu 8

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/GroupContentMenuListBuilder.php, line 88

Class

GroupContentMenuListBuilder
Provides a list controller for the group content menu entity type.

Namespace

Drupal\group_content_menu

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\group_content_menu\GroupContentMenuInterface */
  $row['id'] = $entity
    ->toLink($entity
    ->label(), 'edit-form')
    ->toString();
  $row['bundle'] = \Drupal::entityTypeManager()
    ->getStorage('group_content_menu_type')
    ->load($entity
    ->bundle())
    ->label();
  return $row + parent::buildRow($entity);
}