protected function _initLayoutHelper() { $this->bootstrap('frontController'); if (Shineisp_Main::isReady()) { // Loading the configuration parameters $module = $this->getModuleName(); SettingsParameters::loadParams($module); Zend_Controller_Action_HelperBroker::addHelper(new Shineisp_Controller_Action_Helper_LayoutLoader()); } }
/** * saveRecord * save the setting record group parameters * @param integer $groupid * @param integer $isp */ public static function saveRecord($groupid, $post, $isp = 1) { $i = 0; if (!empty($post)) { $records = new Doctrine_Collection('Settings'); foreach ($post as $field => $value) { // Get the old setting parameter value $setting = self::findRecord($field, $isp); if (!empty($setting)) { // Delete the old record self::deleteItem($setting['setting_id']); } // Get the parameter record $paramenter = SettingsParameters::getParameterbyVar($field); // Create the collection of records $records[$i]->isp_id = $isp; $records[$i]->parameter_id = $paramenter->get('parameter_id'); $records[$i]->value = $value; $i++; } // Save the records $records->save(); // Refresh the parameters SettingsParameters::loadParams(null, true); } return true; }