You are here

public function IPRangesListBuilder::buildRow in IP Ranges 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/ip_ranges/IPRangesListBuilder.php, line 43

Class

IPRangesListBuilder

Namespace

Drupal\ip_ranges

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->getIpDisplay();
  $row['type'] = $entity
    ->getType() ? t('Whitelist') : t('<strong>Blacklist</strong>');
  $row['description'] = $entity
    ->getDescription();
  return $row + parent::buildRow($entity);
}