|
|
@@ -19,6 +19,12 @@ class LocationSearch {
|
|
|
private ?string $internalId = null;
|
|
|
private ?string $name = null;
|
|
|
private ?string $legalEntityName = null;
|
|
|
+ private ?string $brandName = null;
|
|
|
+ private ?string $regionName = null;
|
|
|
+ private ?string $areaManagerName = null;
|
|
|
+ private ?string $operationsManagerName = null;
|
|
|
+ private ?string $gamingManagerName = null;
|
|
|
+ private ?string $seniorGamingManagerName = null;
|
|
|
private bool $includeArchived = false;
|
|
|
private bool $includeClosed = false;
|
|
|
private ?string $minTestDate = null;
|
|
|
@@ -31,6 +37,8 @@ class LocationSearch {
|
|
|
/** @var Test[] */
|
|
|
private array $allTests = [];
|
|
|
|
|
|
+ private int $filterCount = 0;
|
|
|
+
|
|
|
public function __construct(Customer $customer, ?User $user) {
|
|
|
$this->customer = $customer;
|
|
|
$this->user = $user;
|
|
|
@@ -127,13 +135,58 @@ class LocationSearch {
|
|
|
"closed" => 0
|
|
|
];
|
|
|
|
|
|
- if($this->id) $nvp["id"] = $this->id;
|
|
|
- if($this->ids) $nvp["id"] = $this->ids;
|
|
|
- if($this->internalId) $nvp["internal_id"] = Db::escape($this->internalId);
|
|
|
- if($this->name) $nvp["name"] = Constraint::contains($this->name);
|
|
|
- if($this->legalEntityName) $nvp["legal_entity_name"] = Constraint::contains($this->legalEntityName);
|
|
|
- if($this->includeArchived) unset($nvp["archived"]);
|
|
|
- if($this->includeClosed) unset($nvp["closed"]);
|
|
|
+ if($this->id) {
|
|
|
+ $nvp["id"] = $this->id;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->ids) {
|
|
|
+ $nvp["id"] = $this->ids;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->internalId) {
|
|
|
+ $nvp["internal_id"] = Db::escape($this->internalId);
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->name) {
|
|
|
+ $nvp["name"] = Constraint::contains($this->name);
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->legalEntityName) {
|
|
|
+ $nvp["legal_entity_name"] = Constraint::contains($this->legalEntityName);
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->includeArchived) {
|
|
|
+ unset($nvp["archived"]);
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->includeClosed) {
|
|
|
+ unset($nvp["closed"]);
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->brandName) {
|
|
|
+ $nvp["brand"] = $this->brandName;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->regionName) {
|
|
|
+ $nvp["region"] = $this->regionName;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->areaManagerName) {
|
|
|
+ $nvp["area_manager"] = $this->areaManagerName;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->operationsManagerName) {
|
|
|
+ $nvp["operations_manager_name"] = $this->operationsManagerName;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->gamingManagerName) {
|
|
|
+ $nvp["gaming_manager_name"] = $this->gamingManagerName;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
+ if($this->seniorGamingManagerName) {
|
|
|
+ $nvp["senior_gaming_manager_name"] = $this->seniorGamingManagerName;
|
|
|
+ $this->filterCount++;
|
|
|
+ }
|
|
|
|
|
|
$locations = Location::query($nvp, ["sort" => "name", "order" => "asc"]);
|
|
|
|
|
|
@@ -229,4 +282,57 @@ class LocationSearch {
|
|
|
return $constraint;
|
|
|
}
|
|
|
|
|
|
+ public function getBrandName(): ?string {
|
|
|
+ return $this->brandName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getRegionName(): ?string {
|
|
|
+ return $this->regionName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getAreaManagerName(): ?string {
|
|
|
+ return $this->areaManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getOperationsManagerName(): ?string {
|
|
|
+ return $this->operationsManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getGamingManagerName(): ?string {
|
|
|
+ return $this->gamingManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getSeniorGamingManagerName(): ?string {
|
|
|
+ return $this->seniorGamingManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setBrandName(?string $brandName): void {
|
|
|
+ $this->brandName = $brandName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setRegionName(?string $regionName): void {
|
|
|
+ $this->regionName = $regionName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setAreaManagerName(?string $areaManagerName): void {
|
|
|
+ $this->areaManagerName = $areaManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setOperationsManagerName(?string $operationsManagerName): void {
|
|
|
+ $this->operationsManagerName = $operationsManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setSeniorGamingManagerName(?string $seniorGamingManagerName): void {
|
|
|
+ $this->seniorGamingManagerName = $seniorGamingManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setGamingManagerName(?string $gamingManagerName): void {
|
|
|
+ $this->gamingManagerName = $gamingManagerName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getFilterCount(): int {
|
|
|
+ return $this->filterCount;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|