You are here

public function ChannelListBuilder::buildRow in Entity Share 8

Same name and namespace in other branches
  1. 8.3 modules/entity_share_server/src/ChannelListBuilder.php \Drupal\entity_share_server\ChannelListBuilder::buildRow()
  2. 8.2 modules/entity_share_server/src/ChannelListBuilder.php \Drupal\entity_share_server\ChannelListBuilder::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

modules/entity_share_server/src/ChannelListBuilder.php, line 95

Class

ChannelListBuilder
Provides a listing of Channel entities.

Namespace

Drupal\entity_share_server

Code

public function buildRow(EntityInterface $entity) {
  $entity_type = $entity
    ->get('channel_entity_type');
  $bundle = $entity
    ->get('channel_bundle');
  $row['label'] = $entity
    ->label() . ' (' . $entity
    ->id() . ')';
  $row['entity_type'] = $this->entityTypeLabels[$entity_type];
  $row['bundle'] = $this->bundleInfos[$entity_type][$bundle]['label'];
  $row['language'] = $this->languages[$entity
    ->get('channel_langcode')]
    ->getName();
  return $row + parent::buildRow($entity);
}