wip: initial commit

This commit is contained in:
Björn Fromme committed 2024-11-20 18:32:09 +01:00
1 parent ae964198e9
commit d4c4e69d09
91 files changed
+32685 -144

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\BusProNet\Model;
class CrmAttributes
{
public ?array $attributeGroups = null;
public bool $admin = false;
public bool $manager = false;
public bool $houseManager = false;
public bool $teamer = false;
public ?string $hotelCode = null;
public function toArray(): array
{
$crmSelections = [];
foreach ($this->attributeGroups as $group) {
/** @var CrmAttributeGroup $group */
if (false === isset($crmSelections[$group->label])) {
$crmSelections[$group->label] = [];
}
foreach ($group->attributes as $attribute) {
/** @var CrmAttribute $attribute */
if (false === $attribute->selected) {
continue;
}
$crmSelections[$group->label][] = $attribute->label;
}
}
return $crmSelections;
}
}