MODIFIED 2008/10/24 egashira
hiddenタグを出力しないオプションを追加
### Options:
- value - the value of the checkbox
- checked - boolean indicate that this checkbox is checked.
- hiddenField - boolean to indicate if you want the results of checkbox() to include
a hidden input with a value of ''.
- disabled - create a disabled input.
- default - Set the default value for the checkbox. This allows you to start checkboxes
as checked, without having to check the POST data. A matching POST data value, will overwrite
the default value.
/** * チェックボックスを表示する * * @param string $fieldName フィールド文字列 * @param array $attributes html属性 * @return string htmlタグ * @access public */ public function checkbox($fieldName, $attributes = array()) { if ($this->freezed) { $label = ''; if (isset($attributes['label'])) { $label = $attributes['label']; } $options = array(0 => '', 1 => $label); return $this->freezeControll($fieldName, $options, $attributes); } else { return parent::checkbox($fieldName, $attributes); } }
/** * チェックボックスを表示する * * @param string $fieldName フィールド文字列 * @param title $title タイトル * @param array $attributes html属性 * @return string htmlタグ * @access public */ function checkbox($fieldName, $title, $attributes = array()) { if ($this->freezed) { $options = array(0 => '', 1 => $title); return $this->freezeControll($fieldName, $options, $attributes); } else { return parent::checkbox($fieldName, $attributes); } }