You are here

public function PaymentGatewayListBuilder::render in Commerce Core 8.2

Builds the entity listing as renderable array for table.html.twig.

@todo Add a link to add a new item to the #empty text.

Overrides DraggableListBuilder::render

File

modules/payment/src/PaymentGatewayListBuilder.php, line 63

Class

PaymentGatewayListBuilder
Defines the list builder for payment gateways.

Namespace

Drupal\commerce_payment

Code

public function render() {
  $entities = $this
    ->load();

  // If there are less than 2 gateways, disable dragging.
  if (count($entities) <= 1) {
    unset($this->weightKey);
  }
  return parent::render();
}