You are here

public function TagList::buildRow in Doubleclick for Publishers (DFP) 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

src/View/TagList.php, line 38
Contains \Drupal\dfp\View\TagList.

Class

TagList
Defines a class to build a listing of DFP tag entities.

Namespace

Drupal\dfp\View

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\dfp\Entity\TagInterface $entity */
  $row['title']['data'] = $entity
    ->label();
  $row['size']['data'] = $entity
    ->size();
  $row['block']['data'] = $entity
    ->hasBlock() ? $this
    ->t('Yes') : $this
    ->t('No');
  return $row + parent::buildRow($entity);
}