-building helper functions
*/
namespace HalfMoon;
class FormHelperCommon extends Helper {
public $controller = null;
public $form_object = null;
public $html_helper = null;
public $form_prefix = null;
public function __construct() {
$this->html_helper = new HtmlHelper;
}
/* the guts of form_for() and form_tag() */
protected function output_form_around_closure($url_or_obj,
$options = array(), \Closure $form_content) {
if (!isset($options["method"]))
$options["method"] = "post";
if (!empty($options["multipart"])) {
unset($options["multipart"]);
$options["enctype"] = "multipart/form-data";
}
if (!empty($options["form_prefix"])) {
$this->form_prefix = $options["form_prefix"];
unset($options["form_prefix"]);
}
print "
";
$this->form_object = null;
return $this;
}
/* generate