public function BillingScheduleListBuilder::buildRow in Commerce Recurring Framework 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/
BillingScheduleListBuilder.php, line 25
Class
- BillingScheduleListBuilder
- Defines the list builder for billing schedules.
Namespace
Drupal\commerce_recurringCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\commerce_recurring\Entity\BillingScheduleInterface $entity */
$row['label'] = $entity
->label();
if (!$entity
->status()) {
$row['label'] .= ' (' . $this
->t('Disabled') . ')';
}
$row['type'] = $entity
->getPlugin()
->getLabel();
return $row + parent::buildRow($entity);
}