/** * Get all checkboxes * @return string */ private function getCheckboxes() { $Checkboxes = ''; foreach ($this->checkboxes as $key => $label) { $value = isset($this->value[$key]) && $this->value[$key] == 'on' ? 1 : 0; $Checkbox = new FormularCheckbox($this->getNameForKey($key), $label, $value); $Checkbox->setLayout(FormularFieldset::$LAYOUT_FIELD_SMALL_INLINE); $Checkbox->addLayout(FormularFieldset::$LAYOUT_FIELD_W25); $Checkbox->setLabelToRight(); $Checkboxes .= $Checkbox->getCode(); } return $Checkboxes; }
/** * Get single checkbox for one clothes * @param array $dataArray * @return string */ private static function Checkbox($dataArray) { $name = 'clothes[' . $dataArray['id'] . ']'; $label = $dataArray['short']; $Checkbox = new FormularCheckbox($name, $label); $Checkbox->setLayout(FormularFieldset::$LAYOUT_FIELD_SMALL_INLINE); $Checkbox->addLayout('margin-5'); return $Checkbox->getCode(); }