21 lines
523 B
PHP
21 lines
523 B
PHP
<?php
|
|
|
|
namespace KupShop\GraphQLBundle\ApiAdmin\Util;
|
|
|
|
use KupShop\GraphQLBundle\ApiAdmin\Types\Collection\DeliveryCollection;
|
|
use KupShop\GraphQLBundle\ApiAdmin\Types\Order\DeliveryType\Delivery;
|
|
use KupShop\GraphQLBundle\ApiShared\ApiUtil;
|
|
|
|
class DeliveryUtil
|
|
{
|
|
public function getDeliveries($figure = false): DeliveryCollection
|
|
{
|
|
$deliveries = \Delivery::getAll($figure);
|
|
|
|
return new DeliveryCollection(ApiUtil::wrapItems(
|
|
$deliveries,
|
|
Delivery::class
|
|
));
|
|
}
|
|
}
|