plugin =& $plugin; parent::Form($plugin->getTemplatePath() . 'usageStatsSettingsForm.tpl'); $this->addCheck(new FormValidatorPost($this)); } /** * Initialize form data. */ function initData() { $plugin =& $this->plugin; $this->setData('createLogFiles', $plugin->getSetting(CONTEXT_SITE, 'createLogFiles')); $this->setData('accessLogFileParseRegex', $plugin->getSetting(0, 'accessLogFileParseRegex')); } /** * Assign form data to user-submitted data. */ function readInputData() { $this->readUserVars(array('createLogFiles','accessLogFileParseRegex')); } /** * @see Form::fetch() */ function display() { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('pluginName', $this->plugin->getName()); parent::display(); } /** * Save settings. */ function execute() { $plugin =& $this->plugin; $plugin->updateSetting(0, 'createLogFiles', $this->getData('createLogFiles')); $plugin->updateSetting(0, 'accessLogFileParseRegex', $this->getData('accessLogFileParseRegex')); } } ?>