Beispiel #1
0
 /**
  *  Creates and HTML checkbox input tag
  *  @param string $name of the element
  *  @param array $options key => value pairs for tag attributes
  */
 public function checkbox($name, $options = array())
 {
     $options = $this->has_errors($name, $options);
     $options = array_merge($options, array('value' => $this->fetch_value($name)));
     return FormTagHelper::checkbox($this->get_id($name), $this->get_name($name), $options);
 }
Beispiel #2
0
 public function checkbox($id, $name, $options = array())
 {
     $id = $this->id . '_' . $id;
     $name = $this->name . '[' . $name . ']';
     return FormTagHelper::checkbox($id, $name, $options);
 }