/** * @param stdClass $param * */ public function __construct($idx) { parent::__construct(); $this->id = $idx; $this->_container = Fieldset::factory()->addClass(array('static-assets', 'form-horizontal')); $this->_container->id = $this->id . '-body'; $legend = Legend::factory(); $legend->id = $this->_container->id . '-legend'; $this->_container->add($legend); $this->add($this->_container); }
/** * formulario de login * * @param stdClass $param * @return Form * */ public function login(\stdClass $param) { $param->name = $this->safeToggle($param, 'name', 'frmLogin'); $form = $this->form($param); $form->method = self::T_SAF_FORM_METHOD; $fiedset = Fieldset::factory()->add(new Legend($param->legend)); foreach ($param->input as $input) { $fiedset->add($this->_createControlGroupInput($input)); } $options = new \stdClass(); $options->options = $param->toolbar; $form->add($fiedset)->add($this->buttonbar($options)); return $form; }