You are here

public function TweetEntityListBuilder::buildRow in Tweet Feed 8.3

Same name and namespace in other branches
  1. 4.x src/TweetEntityListBuilder.php \Drupal\tweet_feed\TweetEntityListBuilder::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

src/TweetEntityListBuilder.php, line 28

Class

TweetEntityListBuilder
Defines a class to build a listing of Tweet entity entities.

Namespace

Drupal\tweet_feed

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\tweet_feed\Entity\TweetEntity */
  $row['id'] = $entity
    ->getTweetID();
  $row['name'] = Link::createFromRoute($entity
    ->label(), 'entity.tweet_entity.edit_form', [
    'tweet_entity' => $entity
      ->getTweetID(),
  ]);
  return $row + parent::buildRow($entity);
}