You are here

public function BrokenLinkRedirectListBuilder::buildRow in Broken Link 8

Same name and namespace in other branches
  1. 8.3 src/BrokenLinkRedirectListBuilder.php \Drupal\broken_link\BrokenLinkRedirectListBuilder::buildRow()
  2. 8.2 src/BrokenLinkRedirectListBuilder.php \Drupal\broken_link\BrokenLinkRedirectListBuilder::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/BrokenLinkRedirectListBuilder.php, line 27

Class

BrokenLinkRedirectListBuilder
Provides a listing of Broken link redirect entity entities.

Namespace

Drupal\broken_link

Code

public function buildRow(EntityInterface $entity) {
  $row['pattern'] = $entity
    ->get('pattern')
    ->get(0)
    ->getValue()['value'];
  $row['redirect_path'] = $entity
    ->get('redirect_path')
    ->get(0)
    ->getValue()['value'];
  $row['enabled'] = $entity
    ->get('enabled')
    ->get(0)
    ->getValue()['value'];
  $row['weight'] = $entity
    ->get('weight')
    ->get(0)
    ->getValue()['value'];
  return $row + parent::buildRow($entity);
}