public function to_check_box_tag_without_error_wrapping($options = array()) { return parent::to_check_box_tag($options); }
/** * File field auxiliar function * @access private */ function _field($object_name, $column_name, $options = array(), $type, $extra_param_1 = '', $extra_param_2 = '') { if (empty($column_name) && isset($this->object_name)) { $column_name = $object_name; $object_name = $this->object_name; } $object = null; if (isset($options['object'])) { if (is_object($options['object'])) { $object =& $options['object']; if (empty($this->_remove_object_from_options)) { unset($options['object']); } } } if (empty($object) && !empty($this->object)) { $object =& $this->object; //$this->object =& $this->getObject($object_name); } $InstanceTag = new AkFormHelperInstanceTag($object_name, $column_name, $this, null, $object); switch ($type) { case 'file': case 'hidden': case 'password': case 'text': return $InstanceTag->to_input_field_tag($type, $options); break; case 'text_area': return $InstanceTag->to_text_area_tag($options); break; case 'radio_button': return $InstanceTag->to_radio_button_tag($extra_param_1, $options); break; case 'check_box': return $InstanceTag->to_check_box_tag($options, $extra_param_1, $extra_param_2); break; default: break; } }
public function test_to_datetime_select_tag() { $active_record = new MockAkActiveRecord($this); $active_record->setReturnValue('get', '1978-06-16'); $ak_form_helper_instance_tag = new AkFormHelperInstanceTag('person', 'join_date', $active_record, null, $active_record); $this->assertEqual($ak_form_helper_instance_tag->to_datetime_select_tag(), file_get_contents(HelperUnitTest::getFixturesDir() . DS . 'form_helper_to_datetime_select_tag.txt')); }
/** * File field auxiliar function * @access private */ private function _field($type, $object_name, $column_name = null, $tag_options = array(), $options = array()) { // If we provide only one attribute plus type if (!$column_name && $column_name != null && isset($this->object_name)) { $column_name = $object_name; $object_name = $this->object_name; // If we skip object_name } elseif (!empty($this->template) && ($column_name == null || is_array($column_name)) && isset($this->object_name)) { $options = $tag_options; $tag_options = $column_name; $column_name = $object_name; $object_name = $this->object_name; } $object = null; if (isset($tag_options['object'])) { if (is_object($tag_options['object'])) { $object =& $tag_options['object']; if (empty($this->_remove_object_from_options)) { unset($tag_options['object']); } } } if (empty($object) && !empty($this->object)) { $object =& $this->object; } $InstanceTag = new AkFormHelperInstanceTag($object_name, $column_name, $this, null, $object); switch ($type) { case 'file': case 'hidden': case 'password': case 'text': $tag_options['class'] = $this->_set_input_class($tag_options, 'text'); $field = $InstanceTag->to_input_field_tag($type, $tag_options); break; case 'text_area': $field = $InstanceTag->to_text_area_tag($tag_options); break; case 'radio_button': $tag_options['class'] = $this->_set_input_class($tag_options, 'radio_button'); $field = $InstanceTag->to_radio_button_tag($options['tag_value'], $tag_options); break; case 'check_box': $tag_options['class'] = $this->_set_input_class($tag_options, 'check_box'); $field = $InstanceTag->to_check_box_tag($tag_options, $options['checked_value'], $options['unchecked_value']); break; default: break; } // If sexy form is activated, output all the boxes return isset($this->defaults['sexy']) ? $this->_render_sexy_form($options, $field, $object, $column_name, $InstanceTag) : $field; }
public function __construct($object_name, $column_name, &$template_object, $local_binding = null, &$object) { parent::__construct($object_name, $column_name, $template_object, $local_binding, $object); }