public function FulfillmentController::accessNewShipment in Ubercart 8.4
Checks access to the Shipments tab for this order.
Parameters
\Drupal\uc_order\OrderInterface $uc_order: The order to check access for.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'FulfillmentController::accessNewShipment'
- uc_fulfillment.routing.yml in shipping/
uc_fulfillment/ uc_fulfillment.routing.yml - shipping/uc_fulfillment/uc_fulfillment.routing.yml
File
- shipping/
uc_fulfillment/ src/ Controller/ FulfillmentController.php, line 40
Class
- FulfillmentController
- Controller routines for order routes.
Namespace
Drupal\uc_fulfillment\ControllerCode
public function accessNewShipment(OrderInterface $uc_order) {
return AccessResult::allowedIf($this
->accessOrder($uc_order) && \Drupal::database()
->query('SELECT COUNT(*) FROM {uc_packages} WHERE order_id = :id AND sid IS NULL', [
':id' => $uc_order
->id(),
])
->fetchField());
}