/** * Set up options on single field depending on form options * * @param string $name * @param $options */ protected function setupFieldOptions($name, &$options) { if (!$this->isChildForm()) { return; } $options['real_name'] = $name; if (!isset($options['label'])) { $options['label'] = $this->formHelper->formatLabel($name); } }
/** * Defaults used across all fields * * @return array */ private function allDefaults() { return array('wrapper' => array('class' => $this->formHelper->getConfig('defaults.wrapper_class')), 'attr' => array('class' => $this->formHelper->getConfig('defaults.field_class'), 'id' => $this->name), 'default_value' => null, 'label' => $this->formHelper->formatLabel($this->name), 'is_child' => false, 'label_attr' => array('class' => $this->formHelper->getConfig('defaults.label_class')), 'errors' => array('class' => $this->formHelper->getConfig('defaults.error_class'))); }