You are here

public function FilebrowserListBuilder::buildRow in Filebrowser 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

lib/Drupal/filebrowser/Entity/Controller/FilebrowserListBuilder.php, line 26
Contains \Drupal\filebrowser\Entity\Controller\FilebrowserListBuilder.

Class

FilebrowserListBuilder
Provides a list controller for entity. Define header and row content for the FooBar listing. The 'Operations' links are added automatically from the 'links' definition in the entityType annotation when the parent functions are called.

Namespace

Drupal\filebrowser\Entity\Controller

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\filebrowser\Entity\Filebrowser */
  $row['id'] = $entity
    ->id();
  $row['label'] = l($this
    ->getLabel($entity), 'filebrowser/' . $entity
    ->id());
  $row['filebrowser_field'] = $entity
    ->getFilebrowserField();
  return $row + parent::buildRow($entity);
}