public function ShippingQuoteMethodListBuilder::buildRow in Ubercart 8.4
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 DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- shipping/
uc_quote/ src/ ShippingQuoteMethodListBuilder.php, line 79
Class
- ShippingQuoteMethodListBuilder
- Provides a listing of shipping quote method entities.
Namespace
Drupal\uc_quoteCode
public function buildRow(EntityInterface $entity) {
$plugin = $this->shippingQuotePluginManager
->createInstance($entity
->getPluginId(), $entity
->getPluginConfiguration());
$row['label'] = $entity
->label();
$row['description']['#markup'] = $plugin
->getDescription();
$row['status']['#markup'] = $entity
->status() ? $this
->t('Enabled') : $this
->t('Disabled');
return $row + parent::buildRow($entity);
}