You are here

public function CustomFilterListBuilder::buildRow in Custom filter 8

Same name and namespace in other branches
  1. 2.0.x src/CustomFilterListBuilder.php \Drupal\customfilter\CustomFilterListBuilder::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/CustomFilterListBuilder.php, line 30

Class

CustomFilterListBuilder
Provides a listing of Custom Filters.

Namespace

Drupal\customfilter

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = \Drupal::l($this
    ->getLabel($entity), URL::fromRoute('customfilter.rules.list', array(
    'customfilter' => $entity
      ->id(),
  )));
  $row['id'] = $entity
    ->id();

  // You probably want a few more properties here...
  return $row + parent::buildRow($entity);
}