public function addControl($key, Miao_Form_Control $control) { $newControl = clone $control; $newControl->setValue(null); $controlName = $control->getName(); $name = $this->_makeName($key, $controlName); $newControl->setName($name); $this->_controlList[$controlName] = $newControl; return $this; }
public function __construct($name, array $attributes = array(), $url = null) { if (empty($url)) { $url = '/?_prefix=Miao_Office&_action=KCaptcha'; } $this->_url = $url; parent::__construct($name, $attributes); $this->addValidator('KCaptcha'); }
public function __construct($id, array $attributes = array(), $items = array()) { parent::__construct($id, $attributes); $this->setItems($items); }
protected function _makeName($key) { $controlName = $this->_prototype->getName(); $name = sprintf('%s[%s]', $controlName, $key); return $name; }
public function __construct($id, $action = '/', array $attributes = array()) { $this->_exceptAttrMap = array('id', 'method', 'action', 'enctype'); $this->setAction($action); parent::__construct($id, $attributes); }
public function addControl(Miao_Form_Control $control) { $this->_controlPrototypeList[$control->getName()] = $control; return $this; }