private function getFieldName(Tax $tax, TaxClass $class = null) { $classID = $class ? $class->getID() : ''; return 'tax_' . $tax->getID() . '_' . $classID; }
private function getFieldName(DeliveryZone $zone = null, TaxClass $class = null) { $classID = $class ? $class->getID() : '-1'; $zoneID = $zone ? $zone->getID() : '-1'; if ($classID == 0) { $classID = -1; } if ($zoneID == 0) { $zoneID = -1; } return 'taxRate_' . $zoneID . '_' . $classID; }
/** * @return RequestValidator */ public function createClassFormValidator(TaxClass $class) { $validator = $this->getValidator("classForm_" . $class->isExistingRecord() ? $class->getID() : '', $this->request); $validator->addCheck("name", new IsNotEmptyCheck($this->translate("_error_the_name_should_not_be_empty"))); return $validator; }