Pārlūkot izejas kodu

Ajout méthode OrderShopStore

develop
Guillaume Bourgeois pirms 5 mēnešiem
vecāks
revīzija
4053218e54
1 mainītis faili ar 29 papildinājumiem un 15 dzēšanām
  1. +29
    -15
      Repository/Order/OrderShopStore.php

+ 29
- 15
Repository/Order/OrderShopStore.php Parādīt failu

@@ -133,21 +133,6 @@ class OrderShopStore extends AbstractStore
);
}

// getOrderShopsOfWeekByUser
//getByCurrentCycleAndUser
public function getByCurrentDistributionAndUser(UserInterface $user = null, array $params = [], $query = null)
{
return $this->getByCurrentDistribution(
array_merge(
[
'user' => $user,
'excludeComplementaryOrderShops' => true
],
$params
),
$query
);
}

//public $countOrderShopsOfWeek = null;
// public function countByCurrentCycle(bool $excludeComplementaryOrderShops = true, $query = null)
@@ -181,6 +166,35 @@ class OrderShopStore extends AbstractStore
return $this->countOrderShopsOfWeek;*/
}

public function getByCurrentDistributionAndUser(UserInterface $user = null, array $params = [], $query = null)
{
return $this->getByCurrentDistribution(
array_merge(
[
'user' => $user,
'excludeComplementaryOrderShops' => true
],
$params
),
$query
);
}

public function countValidByCurrentDistributionAndUser(UserInterface $user = null, array $params = [], $query = null)
{
return $this->countByCurrentDistribution(
array_merge(
[
'isValid' => true,
'user' => $user,
'excludeComplementaryOrderShops' => true
],
$params
),
$query
);
}

// getNextWeekId
public function getNextCycleId(Distribution $distribution, $query = null): int
{

Notiek ielāde…
Atcelt
Saglabāt