当前位置: 首页>>代码示例>>PHP>>正文


PHP GenericPlugin::manage方法代码示例

本文整理汇总了PHP中GenericPlugin::manage方法的典型用法代码示例。如果您正苦于以下问题:PHP GenericPlugin::manage方法的具体用法?PHP GenericPlugin::manage怎么用?PHP GenericPlugin::manage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GenericPlugin的用法示例。


在下文中一共展示了GenericPlugin::manage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: manage

 function manage($verb, $args)
 {
     if (!parent::manage($verb, $args, $message)) {
         return false;
     }
     $this->import('CustomLocaleHandler');
     $customLocaleHandler = new CustomLocaleHandler();
     switch ($verb) {
         case 'edit':
             $customLocaleHandler->edit($args);
             return true;
         case 'saveLocaleChanges':
             $customLocaleHandler->saveLocaleChanges($args);
             return true;
         case 'editLocaleFile':
             $customLocaleHandler->editLocaleFile($args);
             return true;
         case 'saveLocaleFile':
             $customLocaleHandler->saveLocaleFile($args);
             return true;
         default:
             $customLocaleHandler->index();
             return true;
     }
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:25,代码来源:CustomLocalePlugin.inc.php

示例2: manage

 function manage($verb, $args, &$message)
 {
     if (!parent::manage($verb, $args, $message)) {
         return false;
     }
     switch ($verb) {
         case 'settings':
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $journal =& Request::getJournal();
             $this->import('ReferralPluginSettingsForm');
             $form = new ReferralPluginSettingsForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     Request::redirect(null, 'manager', 'plugin');
                     return false;
                 } else {
                     $this->setBreadCrumbs(true);
                     $form->display();
                 }
             } else {
                 $this->setBreadCrumbs(true);
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
     }
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:33,代码来源:ReferralPlugin.inc.php

示例3: manage

 /**
  * @see GenericPlugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     switch ($verb) {
         case 'settings':
             $journal =& Request::getJournal();
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $this->import('SettingsForm');
             $form = new SettingsForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     $message = NOTIFICATION_TYPE_SUCCESS;
                     $messageParams = array('contents' => __('plugins.generic.alm.settings.saved'));
                     return false;
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:36,代码来源:AlmPlugin.inc.php

示例4: manage

 function manage($verb, $args, &$message, &$messageParams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     switch ($verb) {
         case 'translate':
             Request::redirect('index', 'translate');
             return false;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:reconciler,项目名称:ojs,代码行数:15,代码来源:TranslatorPlugin.inc.php

示例5: manage

 /**
  * @see PKPPlugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = null)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     switch ($verb) {
         case 'translate':
             $request->redirect('index', 'translate');
             return false;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:jalperin,项目名称:ojs,代码行数:19,代码来源:TranslatorPlugin.inc.php

示例6: manage

 /**
  * @see PKPPlugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = null)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     switch ($verb) {
         case 'settings':
             $journal = $request->getJournal();
             $templateMgr = TemplateManager::getManager($request);
             $templateMgr->register_function('plugin_url', array($this, 'smartyPluginUrl'));
             $this->import('SettingsForm');
             $form = new SettingsForm($this, $journal->getId());
             $form->readInputData();
             if ($request->getUserVar('addBlock')) {
                 // Add a block
                 $editData = true;
                 $blocks = $form->getData('blocks');
                 array_push($blocks, '');
                 $form->_data['blocks'] = $blocks;
             } else {
                 if (($delBlock = $request->getUserVar('delBlock')) && count($delBlock) == 1) {
                     // Delete an block
                     $editData = true;
                     list($delBlock) = array_keys($delBlock);
                     $delBlock = (int) $delBlock;
                     $blocks = $form->getData('blocks');
                     if (isset($blocks[$delBlock]) && !empty($blocks[$delBlock])) {
                         $deletedBlocks = explode(':', $form->getData('deletedBlocks'));
                         array_push($deletedBlocks, $blocks[$delBlock]);
                         $form->setData('deletedBlocks', join(':', $deletedBlocks));
                     }
                     array_splice($blocks, $delBlock, 1);
                     $form->_data['blocks'] = $blocks;
                 } else {
                     if ($request->getUserVar('save')) {
                         $editData = true;
                         $form->execute();
                     } else {
                         $form->initData();
                     }
                 }
             }
             if (!isset($editData) && $form->validate()) {
                 $form->execute();
                 $form->display();
                 exit;
             } else {
                 $form->display();
                 exit;
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:jalperin,项目名称:ojs,代码行数:61,代码来源:CustomBlockManagerPlugin.inc.php

示例7: manage

 /**
  * @see Plugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = null)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     switch ($verb) {
         case 'settings':
             $journal = $request->getJournal();
             $templateMgr = TemplateManager::getManager($request);
             $templateMgr->register_function('plugin_url', array($this, 'smartyPluginUrl'));
             $this->import('SettingsForm');
             $form = new SettingsForm($this, $journal->getId());
             if ($request->getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     return false;
                 } else {
                     $form->display($request);
                 }
             } else {
                 $form->initData();
                 $form->display($request);
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:mariojp,项目名称:ojs,代码行数:35,代码来源:AnnouncementFeedPlugin.inc.php

示例8: manage

 /**
  * @see GenericPlugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
     $journal =& Request::getJournal();
     switch ($verb) {
         case 'connect':
             $this->import('classes.form.DataverseAuthForm');
             $form = new DataverseAuthForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     Request::redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'select'));
                     return false;
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             return true;
         case 'select':
             $this->import('classes.form.DataverseSelectForm');
             $form = new DataverseSelectForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     Request::redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'settings'));
                     return false;
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             return true;
         case 'settings':
             $this->import('classes.form.SettingsForm');
             $form = new SettingsForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     Request::redirect(null, 'manager', 'plugin', array('generic'));
                     return false;
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:69,代码来源:DataversePlugin.inc.php

示例9: manage

 function manage($verb, $args, &$message, &$messageParams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     switch ($verb) {
         case 'settings':
             $templateMgr =& TemplateManager::getManager();
             $journal =& Request::getJournal();
             $this->import('OpenAdsSettingsForm');
             $this->import('OpenAdsConnection');
             $openAdsConnection = new OpenAdsConnection($this, $this->getInstallationPath());
             $openAdsConnection->loadConfig();
             $form = new OpenAdsSettingsForm($this, $openAdsConnection, $journal->getId());
             if (array_shift($args) == 'save') {
                 $form->readInputData();
                 $form->execute();
                 Request::redirect(null, 'manager', 'plugins');
                 return false;
             } else {
                 $form->initData();
                 $form->display();
                 return true;
             }
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:30,代码来源:OpenAdsPlugin.inc.php

示例10: manage

 /**
  * Perform management functions
  */
 function manage($verb, $args, &$message, &$messageparams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     $conference =& $request->getConference();
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
     $templateMgr->assign('pagesPath', $request->url(null, null, 'pages', 'view', 'REPLACEME'));
     $pageCrumbs = array(array($request->url(null, null, 'user'), 'navigation.user'), array($request->url(null, null, 'manager'), 'user.role.manager'));
     switch ($verb) {
         case 'settings':
             $this->import('StaticPagesSettingsForm');
             $form = new StaticPagesSettingsForm($this, $conference->getId());
             $templateMgr->assign('pageHierarchy', $pageCrumbs);
             $form->initData($request);
             $form->display();
             return true;
         case 'edit':
         case 'add':
             $this->import('StaticPagesEditForm');
             $staticPageId = isset($args[0]) ? (int) $args[0] : null;
             $form = new StaticPagesEditForm($this, $conference->getId(), $staticPageId);
             if ($form->isLocaleResubmit()) {
                 $form->readInputData();
                 $form->addTinyMCE($request);
             } else {
                 $form->initData();
             }
             $pageCrumbs[] = array($request->url(null, null, 'manager', 'plugin', array('generic', $this->getName(), 'settings')), $this->getDisplayName(), true);
             $templateMgr->assign('pageHierarchy', $pageCrumbs);
             $form->display();
             return true;
         case 'save':
             $this->import('StaticPagesEditForm');
             $staticPageId = isset($args[0]) ? (int) $args[0] : null;
             $form = new StaticPagesEditForm($this, $conference->getId(), $staticPageId);
             if ($request->getUserVar('edit')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->save();
                     $templateMgr->assign(array('currentUrl' => $request->url(null, null, null, null, array($this->getCategory(), $this->getName(), 'settings')), 'pageTitle' => 'plugins.generic.staticPages.displayName', 'pageHierarchy' => $pageCrumbs, 'message' => 'plugins.generic.staticPages.pageSaved', 'backLink' => $request->url(null, null, null, null, array($this->getCategory(), $this->getName(), 'settings')), 'backLinkLabel' => 'common.continue'));
                     $templateMgr->display('common/message.tpl');
                     exit;
                 } else {
                     $form->addTinyMCE($request);
                     $form->display();
                     exit;
                 }
             }
             $request->redirect(null, null, null, 'manager', 'plugins');
             return false;
         case 'delete':
             $staticPageId = isset($args[0]) ? (int) $args[0] : null;
             $staticPagesDao = DAORegistry::getDAO('StaticPagesDAO');
             $staticPagesDao->deleteStaticPageById($staticPageId);
             $templateMgr->assign(array('currentUrl' => $request->url(null, null, null, null, array($this->getCategory(), $this->getName(), 'settings')), 'pageTitle' => 'plugins.generic.staticPages.displayName', 'message' => 'plugins.generic.staticPages.pageDeleted', 'backLink' => $request->url(null, null, null, null, array($this->getCategory(), $this->getName(), 'settings')), 'backLinkLabel' => 'common.continue'));
             $templateMgr->assign('pageHierarchy', $pageCrumbs);
             $templateMgr->display('common/message.tpl');
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:artkuo,项目名称:ocs,代码行数:70,代码来源:StaticPagesPlugin.inc.php

示例11: manage

 /**
  * @see Plugin::manage()
  */
 function manage($args, $request)
 {
     if (!parent::manage($args, $request)) {
         return false;
     }
     switch (array_shift($args)) {
         case 'settings':
             $templateMgr = TemplateManager::getManager($request);
             $templateMgr->register_function('plugin_url', array($this, 'smartyPluginUrl'));
             $journal = $request->getJournal();
             $this->import('classes.form.BrowseSettingsForm');
             $form = new BrowseSettingsForm($this, $journal->getId());
             if ($request->getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     $request->redirect(null, 'manager', 'plugins');
                     return false;
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:pkp,项目名称:ojs,代码行数:35,代码来源:BrowsePlugin.inc.php

示例12: manage

 /**
  * @copydoc PKPPlugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams)
 {
     $journal =& Request::getJournal();
     switch ($verb) {
         case 'settings':
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $this->import('classes.form.PLNSettingsForm');
             $form = new PLNSettingsForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     $message = NOTIFICATION_TYPE_SUCCESS;
                     $messageParams = array('contents' => __('plugins.generic.pln.settings.saved'));
                     return false;
                 } else {
                     $this->setBreadcrumbs('settings');
                     $form->display();
                 }
             } else {
                 if (Request::getUserVar('refresh')) {
                     $this->getServiceDocument($journal->getId());
                 }
                 $this->setBreadcrumbs('settings');
                 $form->initData();
                 $form->display();
             }
             return true;
         case 'status':
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $this->import('classes.form.PLNStatusForm');
             $form = new PLNStatusForm($this, $journal->getId());
             if (Request::getUserVar('reset')) {
                 $journal =& Request::getJournal();
                 $deposit_ids = array_keys(Request::getUserVar('reset'));
                 $depositDao =& DAORegistry::getDAO('DepositDAO');
                 foreach ($deposit_ids as $deposit_id) {
                     $deposit =& $depositDao->getDepositById($journal->getId(), $deposit_id);
                     $deposit->setStatus(PLN_PLUGIN_DEPOSIT_STATUS_NEW);
                     $depositDao->updateDeposit($deposit);
                 }
             }
             $this->setBreadCrumbs('status');
             $form->display();
             return true;
         default:
             return parent::manage($verb, $args, $message, $messageParams);
     }
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:54,代码来源:PLNPlugin.inc.php

示例13: manage

 /**
  * @see PKPPlugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = null)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_USER);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->register_function('plugin_url', array($this, 'smartyPluginUrl'));
     $journal = $request->getJournal();
     $journalId = $journal->getId();
     switch ($verb) {
         case 'delete':
             if (!empty($args)) {
                 $externalFeedId = !isset($args) || empty($args) ? null : (int) $args[0];
                 $externalFeedDao = DAORegistry::getDAO('ExternalFeedDAO');
                 // Ensure externalFeed is for this journal
                 if ($externalFeedDao->getExternalFeedJournalId($externalFeedId) == $journalId) {
                     $externalFeedDao->deleteExternalFeedById($externalFeedId);
                 }
             }
             $request->redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'feeds'));
             return true;
         case 'move':
             $externalFeedId = !isset($args) || empty($args) ? null : (int) $args[0];
             $externalFeedDao = DAORegistry::getDAO('ExternalFeedDAO');
             // Ensure externalFeed is valid and for this journal
             if ($externalFeedId != null && $externalFeedDao->getExternalFeedJournalId($externalFeedId) == $journalId) {
                 $feed =& $externalFeedDao->getExternalFeed($externalFeedId);
                 $direction = $this->getRequest()->getUserVar('dir');
                 if ($direction != null) {
                     // moving with up or down arrow
                     $isDown = $direction == 'd';
                     $feed->setSeq($feed->getSeq() + ($isDown ? 1.5 : -1.5));
                     $externalFeedDao->updateExternalFeed($feed);
                     $externalFeedDao->resequenceExternalFeeds($feed->getJournalId());
                 }
             }
             $this->getRequest()->redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'feeds'));
             return true;
         case 'create':
         case 'edit':
             $externalFeedId = !isset($args) || empty($args) ? null : (int) $args[0];
             $externalFeedDao = DAORegistry::getDAO('ExternalFeedDAO');
             // Ensure externalFeed is valid and for this journal
             if ($externalFeedId != null && $externalFeedDao->getExternalFeedJournalId($externalFeedId) == $journalId || $externalFeedId == null) {
                 $this->import('ExternalFeedForm');
                 if ($externalFeedId == null) {
                     $templateMgr->assign('externalFeedTitle', 'plugins.generic.externalFeed.manager.createTitle');
                 } else {
                     $templateMgr->assign('externalFeedTitle', 'plugins.generic.externalFeed.manager.editTitle');
                 }
                 $journalSettingsDao = DAORegistry::getDAO('JournalSettingsDAO');
                 $journalSettings =& $journalSettingsDao->getSettings($journalId);
                 $externalFeedForm = new ExternalFeedForm($this, $externalFeedId, $journalId);
                 if ($externalFeedForm->isLocaleResubmit()) {
                     $externalFeedForm->readInputData();
                 } else {
                     $externalFeedForm->initData();
                 }
                 $templateMgr->assign('journalSettings', $journalSettings);
                 $externalFeedForm->display();
             } else {
                 $this->getRequest()->redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'feeds'));
             }
             return true;
         case 'update':
             $externalFeedId = $this->getRequest()->getUserVar('feedId') == null ? null : (int) $this->getRequest()->getUserVar('feedId');
             $externalFeedDao = DAORegistry::getDAO('ExternalFeedDAO');
             if ($externalFeedId != null && $externalFeedDao->getExternalFeedJournalId($externalFeedId) == $journalId || $externalFeedId == null) {
                 $this->import('ExternalFeedForm');
                 $externalFeedForm = new ExternalFeedForm($this, $externalFeedId, $journalId);
                 $externalFeedForm->readInputData();
                 if ($externalFeedForm->validate()) {
                     $externalFeedForm->execute();
                     if ($this->getRequest()->getUserVar('createAnother')) {
                         $this->getRequest()->redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'create'));
                     } else {
                         $this->getRequest()->redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'feeds'));
                     }
                 } else {
                     if ($externalFeedId == null) {
                         $templateMgr->assign('externalFeedTitle', 'plugins.generic.externalFeed.manager.createTitle');
                     } else {
                         $templateMgr->assign('externalFeedTitle', 'plugins.generic.externalFeed.manager.editTitle');
                     }
                     $journalSettingsDao = DAORegistry::getDAO('JournalSettingsDAO');
                     $journalSettings =& $journalSettingsDao->getSettings($journalId);
                     $templateMgr->assign('journalSettings', $journalSettings);
                     $externalFeedForm->display();
                 }
             } else {
                 $this->getRequest()->redirect(null, 'manager', 'plugin', array('generic', $this->getName(), 'feeds'));
             }
             return true;
         case 'settings':
             $this->import('ExternalFeedSettingsForm');
//.........这里部分代码省略.........
开发者ID:jalperin,项目名称:ojs,代码行数:101,代码来源:ExternalFeedPlugin.inc.php

示例14: manage

 function manage($verb, $args, &$message, &$messageParams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     switch ($verb) {
         case 'settings':
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $conference =& $request->getConference();
             $this->import('GoogleAnalyticsSettingsForm');
             $form = new GoogleAnalyticsSettingsForm($this, $conference->getId());
             if ($request->getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     $request->redirect(null, null, 'manager', 'plugin');
                     return false;
                 } else {
                     $this->setBreadCrumbs(true);
                     $form->display();
                 }
             } else {
                 $this->setBreadCrumbs(true);
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
开发者ID:artkuo,项目名称:ocs,代码行数:35,代码来源:GoogleAnalyticsPlugin.inc.php

示例15: manage

 /**
  * @see PKPPlugin::manage()
  */
 function manage($args, $request)
 {
     $this->import('UsageStatsSettingsForm');
     switch ($request->getUserVar('verb')) {
         case 'settings':
             $settingsForm = new UsageStatsSettingsForm($this);
             $settingsForm->initData();
             return new JSONMessage(true, $settingsForm->fetch($request));
         case 'save':
             $settingsForm = new UsageStatsSettingsForm($this);
             $settingsForm->readInputData();
             if ($settingsForm->validate()) {
                 $settingsForm->execute();
                 $notificationManager = new NotificationManager();
                 $notificationManager->createTrivialNotification($request->getUser()->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('plugins.generic.usageStats.settings.saved')));
                 return new JSONMessage(true);
             }
             return new JSONMessage(true, $settingsForm->fetch($request));
     }
     return parent::manage($args, $request);
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:24,代码来源:PKPUsageStatsPlugin.inc.php


注:本文中的GenericPlugin::manage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。