You are here

public function CslStyleListBuilder::buildRow in Bibliography & Citation 2.0.x

Same name and namespace in other branches
  1. 8 src/CslStyleListBuilder.php \Drupal\bibcite\CslStyleListBuilder::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/CslStyleListBuilder.php, line 26

Class

CslStyleListBuilder
Provides a listing of CSL style entities.

Namespace

Drupal\bibcite

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\bibcite\Entity\CslStyleInterface $entity */
  $row['id'] = $entity
    ->id();
  $row['label'] = $entity
    ->label();
  $row['status'] = $entity
    ->status() ? $this
    ->t('Enabled') : $this
    ->t('Disabled');
  return $row + parent::buildRow($entity);
}