public function TaxRateListBuilder::buildOperations in Ubercart 8.4
Same name in this branch
- 8.4 uc_tax/src/TaxRateListBuilder.php \Drupal\uc_tax\TaxRateListBuilder::buildOperations()
- 8.4 uc_tax/src/Controller/TaxRateListBuilder.php \Drupal\uc_tax\Controller\TaxRateListBuilder::buildOperations()
Builds a renderable list of operation links for the entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity on which the linked operations will be performed.
Return value
array A renderable array of operation links.
Overrides EntityListBuilder::buildOperations
See also
\Drupal\Core\Entity\EntityListBuilder::buildRow()
File
- uc_tax/
src/ Controller/ TaxRateListBuilder.php, line 52
Class
- TaxRateListBuilder
- Provides a listing of uc_tax_rate configuration entities.
Namespace
Drupal\uc_tax\ControllerCode
public function buildOperations(EntityInterface $entity) {
$build = parent::buildOperations($entity);
$build['#links']['clone'] = [
'title' => $this
->t('Clone'),
'url' => Url::fromRoute('entity.uc_tax_rate.clone', [
'uc_tax_rate' => $entity
->id(),
]),
'weight' => 10,
];
uasort($build['#links'], 'Drupal\\Component\\Utility\\SortArray::sortByWeightElement');
return $build;
}