public function indexAction() { if ($this->getParam("save") === 'yes') { $settings = array("replaceobjects" => $this->getParam("replaceobjects") === PimPon_Plugin::ALLOW_REPLACE ? PimPon_Plugin::ALLOW_REPLACE : PimPon_Plugin::DENY_REPLACE, "replacedocuments" => $this->getParam("replacedocuments") === PimPon_Plugin::ALLOW_REPLACE ? PimPon_Plugin::ALLOW_REPLACE : PimPon_Plugin::DENY_REPLACE, "replaceroutes" => $this->getParam("replaceroutes") === PimPon_Plugin::ALLOW_REPLACE ? PimPon_Plugin::ALLOW_REPLACE : PimPon_Plugin::DENY_REPLACE, "replaceusers" => $this->getParam("replaceusers") === PimPon_Plugin::ALLOW_REPLACE ? PimPon_Plugin::ALLOW_REPLACE : PimPon_Plugin::DENY_REPLACE, "replaceroles" => $this->getParam("replaceroles") === PimPon_Plugin::ALLOW_REPLACE ? PimPon_Plugin::ALLOW_REPLACE : PimPon_Plugin::DENY_REPLACE); $config = new Zend_Config($settings, true); $writer = new Zend_Config_Writer_Xml(array("config" => $config, "filename" => PimPon_Plugin::getConfigFile())); $writer->write(); } $config = PimPon_Plugin::getConfig(); $this->view->config = $config; }
private function allowReplace() { $config = PimPon_Plugin::getConfig(); return $config->replaceroles === PimPon_Plugin::ALLOW_REPLACE ? true : false; }