function DateFormatListBuilder::buildRow

Same name in other branches
  1. 9 core/modules/system/src/DateFormatListBuilder.php \Drupal\system\DateFormatListBuilder::buildRow()
  2. 8.9.x core/modules/system/src/DateFormatListBuilder.php \Drupal\system\DateFormatListBuilder::buildRow()
  3. 11.x core/modules/system/src/DateFormatListBuilder.php \Drupal\system\DateFormatListBuilder::buildRow()

Overrides EntityListBuilder::buildRow

File

core/modules/system/src/DateFormatListBuilder.php, line 73

Class

DateFormatListBuilder
Defines a class to build a listing of date format entities.

Namespace

Drupal\system

Code

public function buildRow(EntityInterface $entity) {
    $row['label'] = $entity->label();
    $row['pattern'] = $this->dateFormatter
        ->format($this->time
        ->getRequestTime(), $entity->id());
    return $row + parent::buildRow($entity);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.