class QuantityListBuilder in farmOS 2.x
Defines a class to build a listing of Quantity entities.
Hierarchy
- class \Drupal\quantity\QuantityListBuilder extends \Drupal\entity\BulkFormEntityListBuilder
Expanded class hierarchy of QuantityListBuilder
File
- modules/
core/ quantity/ src/ QuantityListBuilder.php, line 13
Namespace
Drupal\quantityView source
class QuantityListBuilder extends BulkFormEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this
->t('ID');
$header['label'] = $this
->t('Label');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\quantity\Entity\QuantityInterface $entity */
$row['id'] = [
'#markup' => $entity
->id(),
];
$row['name'] = $entity
->toLink($entity
->label(), 'canonical')
->toRenderable();
return $row + parent::buildRow($entity);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QuantityListBuilder:: |
public | function | ||
QuantityListBuilder:: |
public | function |