You are here

public function EntityBrowserListBuilder::buildRow in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Controllers/EntityBrowserListBuilder.php \Drupal\entity_browser\Controllers\EntityBrowserListBuilder::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/Controllers/EntityBrowserListBuilder.php, line 32

Class

EntityBrowserListBuilder
Provides a list controller for entity browser.

Namespace

Drupal\entity_browser\Controllers

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\entity_browser\Entity\EntityBrowser */
  $row['id'] = $entity
    ->id();
  $row['name'] = $entity
    ->label();
  return $row + parent::buildRow($entity);
}