public function TweetEntityListBuilder::buildRow in Tweet Feed 4.x
Same name and namespace in other branches
- 8.3 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_feedCode
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.canonical', [
'tweet_entity' => $entity
->id(),
]);
return $row + parent::buildRow($entity);
}