journalId = $journalId; $this->plugin =& $plugin; parent::Form($plugin->getTemplatePath() . 'settingsForm.tpl'); } /** * Initialize form data. */ function initData() { $journalId = $this->journalId; $plugin =& $this->plugin; $this->_data = array( 'location' => $plugin->getSetting($journalId, 'location') ); } /** * Get the list of field names for which localized settings are used. * @return array */ function getLocaleFieldNames() { return array('location'); } /** * Assign form data to user-submitted data. */ function readInputData() { $this->readUserVars(array('location')); } /** * Save settings. */ function execute() { $journalId =& Request::getJournal()->getId(); $plugin =& $this->plugin; $value = $this->getData('location'); if (is_array($value)) { $plugin->updateSetting($journalId, 'location', $value, 'object'); } } } ?>