_contextId = $contextId; $this->_plugin = $plugin; parent::__construct($plugin->getTemplatePath() . 'settingsForm.tpl'); $this->addCheck(new FormValidatorPost($this)); $this->addCheck(new FormValidatorCSRF($this)); } /** * Initialize form data. */ function initData() { $contextId = $this->_contextId; $plugin = $this->_plugin; $this->setData('manualInstructions', $plugin->getSetting($contextId, 'manualInstructions')); } /** * Assign form data to user-submitted data. */ function readInputData() { $this->readUserVars(array('manualInstructions')); } /** * Save settings. */ function execute() { $plugin = $this->_plugin; $contextId = $this->_contextId; $plugin->updateSetting($contextId, 'manualInstructions', $this->getData('manualInstructions')); } } ?>