29 lines
622 B
PHP
29 lines
622 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\GraphQLBundle\ApiAdmin\Controller;
|
|
|
|
use KupShop\GraphQLBundle\ApiAdmin\Types\Collection\DeliveryCollection;
|
|
use KupShop\GraphQLBundle\ApiAdmin\Util\DeliveryUtil;
|
|
use TheCodingMachine\GraphQLite\Annotations\Query;
|
|
|
|
class DeliveryController
|
|
{
|
|
private DeliveryUtil $deliveryUtil;
|
|
|
|
public function __construct(DeliveryUtil $deliveryUtil)
|
|
{
|
|
$this->deliveryUtil = $deliveryUtil;
|
|
}
|
|
|
|
/**
|
|
* Seznam doprav.
|
|
*/
|
|
#[Query]
|
|
public function deliveries(): DeliveryCollection
|
|
{
|
|
return $this->deliveryUtil->getDeliveries();
|
|
}
|
|
}
|