You are here

public function ProfileTypeListBuilder::buildRow in Profile 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/ProfileTypeListBuilder.php, line 26

Class

ProfileTypeListBuilder
Defines the list builder for profile types.

Namespace

Drupal\profile

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\profile\Entity\ProfileTypeInterface $entity */
  $row['type'] = $entity
    ->toLink(NULL, 'edit-form');
  $row['registration'] = $entity
    ->getRegistration() ? $this
    ->t('Yes') : $this
    ->t('No');
  $row['multiple'] = $entity
    ->allowsMultiple() ? $this
    ->t('Yes') : $this
    ->t('No');
  return $row + parent::buildRow($entity);
}