You are here

public function SmartDateFormatListBuilder::buildRow in Smart Date 8.2

Same name and namespace in other branches
  1. 8 src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::buildRow()
  2. 3.x src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::buildRow()
  3. 3.0.x src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::buildRow()
  4. 3.1.x src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::buildRow()
  5. 3.2.x src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::buildRow()
  6. 3.3.x src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::buildRow()
  7. 3.4.x src/Entity/SmartDateFormatListBuilder.php \Drupal\smart_date\Entity\SmartDateFormatListBuilder::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/Entity/SmartDateFormatListBuilder.php, line 29

Class

SmartDateFormatListBuilder
Defines a class to build a listing of Smart date formats.

Namespace

Drupal\smart_date\Entity

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\smart_date\Entity\SmartDateFormat */
  $row['query'] = Link::createFromRoute($entity
    ->label(), 'entity.smart_date_format.edit_form', [
    'smart_date_format' => $entity
      ->id(),
  ]);

  // List the nodes that are elevated and excluded.
  $row['date_format']['data'] = $entity
    ->get('date_format');
  $row['time_format']['data'] = $entity
    ->get('time_format');
  return $row + parent::buildRow($entity);
}