private function _initConfigsForm($section, $namespace, $configs = array(), $posts = null) { if (self::$configForm === null) { self::$configForm = new Application_Form_AutoConfigs($configs); self::$configForm->setAction($this->_helper->url->url(array('action' => 'save', 'controller' => 'config'), 'default', false)); if ($posts !== null && is_array($posts)) { self::$configForm->setDefaults($posts); } foreach (self::$configForm->getElements() as $key => $element) { // plugins prepare known elements X_VlcShares_Plugins::broker()->prepareConfigElement($section, $namespace, $key, $element, self::$configForm, $this); } if ($posts !== null && is_array($posts)) { // reset errors //self::$configForm->setErrors(array()); self::$configForm->isValid($posts); } } /* if ( $posts !== null && is_array($posts) ) { $this->configForm->isValid($posts); } */ return self::$configForm; }