mappings['properties'])) { $this->mappings['properties'] = System::getContainer()->getParameter('vonrotenberg_shopware_api.mappings.properties'); } if (!isset($this->mappings['property_groups'])) { $this->mappings['property_groups'] = System::getContainer()->getParameter('vonrotenberg_shopware_api.mappings.property_groups'); } if (!isset($this->mappings['units'])) { $this->mappings['units'] = System::getContainer()->getParameter('vonrotenberg_shopware_api.mappings.units'); } if (!isset($this->mappings['currencies'])) { $this->mappings['currencies'] = System::getContainer()->getParameter('vonrotenberg_shopware_api.mappings.currencies'); } return $this->mappings; } public function getPropertyIdByNameAndGroup(string $name, string $group, bool $useGroupUuid = false): ?string { $mappings = $this->getMappings(); $propertyId = null; if (!$useGroupUuid) { $group = array_search($group, $mappings['property_groups']); } if ($group !== false && ($property = array_search($name, $mappings['properties'][$group])) !== false) { $propertyId = $property; } return $propertyId; } public function getPropertyGroupIdByName(string $name): ?string { $mappings = $this->getMappings(); $groupId = null; if (($group = array_search($name, $mappings['property_groups'])) !== false) { $groupId = $group; } return $groupId; } public function getUnitIdByName(string $name): ?string { $mappings = $this->getMappings(); $unitId = null; if (($unit = array_search($name, $mappings['units'])) !== false) { $unitId = $unit; } return $unitId; } public function getCurrencyIdByName(string $name): ?string { $mappings = $this->getMappings(); $currencyId = null; if (($currency = array_search($name, $mappings['currencies'])) !== false) { $currencyId = $currency; } return $currencyId; } }