public function __construct($customerType, $brandId) { $dict = new Logic_Dictionary(); $customerTypeId = $dict->getDictionaryEntryId('client_type', $customerType); if ($customerTypeId === null) { throw new Exception('Niepoprawny kod słownikowy typu klienta!'); } $addonTypeModel = new AddonType(); $addonTypeId = $addonTypeModel->getAddonTypeId($this->addonCode); if ($addonTypeId === null) { throw new Exception('Niepoprawny kod typu dodatku!'); } $this->addonTypeId = $addonTypeId; $this->customerTypeId = $customerTypeId; $this->brandId = $brandId; parent::__construct($this->addonName); }