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


PHP ManagerHandler类代码示例

本文整理汇总了PHP中ManagerHandler的典型用法代码示例。如果您正苦于以下问题:PHP ManagerHandler类的具体用法?PHP ManagerHandler怎么用?PHP ManagerHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: email

 /**
  * Send an email to a user or group of users.
  */
 function email($args)
 {
     parent::validate();
     ManagerHandler::setupTemplate(true);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('helpTopicId', 'journal.users.emailUsers');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $site =& Request::getSite();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     import('mail.MailTemplate');
     $email =& new MailTemplate(Request::getUserVar('template'), Request::getUserVar('locale'));
     if (Request::getUserVar('send') && !$email->hasErrors()) {
         $email->send();
         Request::redirect(null, Request::getRequestedPage());
     } else {
         $email->assignParams();
         // FIXME Forces default parameters to be assigned (should do this automatically in MailTemplate?)
         if (!Request::getUserVar('continued')) {
             if (($groupId = Request::getUserVar('toGroup')) != '') {
                 // Special case for emailing entire groups:
                 // Check for a group ID and add recipients.
                 $groupDao =& DAORegistry::getDAO('GroupDAO');
                 $group =& $groupDao->getGroup($groupId);
                 if ($group && $group->getJournalId() == $journal->getJournalId()) {
                     $groupMembershipDao =& DAORegistry::getDAO('GroupMembershipDAO');
                     $memberships =& $groupMembershipDao->getMemberships($group->getGroupId());
                     $memberships =& $memberships->toArray();
                     foreach ($memberships as $membership) {
                         $user =& $membership->getUser();
                         $email->addRecipient($user->getEmail(), $user->getFullName());
                     }
                 }
             }
             if (count($email->getRecipients()) == 0) {
                 $email->addRecipient($user->getEmail(), $user->getFullName());
             }
         }
         $email->displayEditForm(Request::url(null, null, 'email'), array(), 'manager/people/email.tpl');
     }
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:44,代码来源:ManagerHandler.inc.php

示例2: PluginHandler

 /**
  * Constructor
  */
 function PluginHandler()
 {
     parent::ManagerHandler();
 }
开发者ID:reconciler,项目名称:ojs,代码行数:7,代码来源:PluginHandler.inc.php

示例3: ManagerPaymentHandler

 /**
  * Constructor
  **/
 function ManagerPaymentHandler()
 {
     parent::ManagerHandler();
 }
开发者ID:ucsal,项目名称:ojs,代码行数:7,代码来源:ManagerPaymentHandler.inc.php

示例4: PeopleHandler

 /**
  * Constructor
  **/
 function PeopleHandler()
 {
     parent::ManagerHandler();
     $this->addRoleAssignment(ROLE_ID_PRESS_MANAGER, array('people', 'enrollSearch', 'showNoRole', 'enroll', 'unEnroll', 'createUser', 'suggestUsername', 'editUser', 'mergeUsers', 'disableUser', 'enableUser', 'removeUser', 'updateUser', 'userProfile'));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:8,代码来源:PeopleHandler.inc.php

示例5: ApprovalNoticesHandler

 /**
  * Constructor
  **/
 function ApprovalNoticesHandler()
 {
     parent::ManagerHandler();
     $this->approvalNoticeDao =& DAORegistry::getDAO('ApprovalNoticeDAO');
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:8,代码来源:ApprovalNoticesHandler.inc.php

示例6: TimelineHandler

 /**
  * Constructor
  **/
 function TimelineHandler()
 {
     parent::ManagerHandler();
 }
开发者ID:artkuo,项目名称:ocs,代码行数:7,代码来源:TimelineHandler.inc.php

示例7: JournalLanguagesHandler

 /**
  * Constructor
  **/
 function JournalLanguagesHandler()
 {
     parent::ManagerHandler();
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:7,代码来源:JournalLanguagesHandler.inc.php

示例8: FilesHandler

 /**
  * Constructor
  */
 function FilesHandler()
 {
     parent::ManagerHandler();
 }
开发者ID:artkuo,项目名称:ocs,代码行数:7,代码来源:FilesHandler.inc.php

示例9: plugin

 /**
  * Perform plugin-specific management functions.
  */
 function plugin($args)
 {
     $category = array_shift($args);
     $plugin = array_shift($args);
     $verb = array_shift($args);
     parent::validate();
     $plugins =& PluginRegistry::loadCategory($category);
     if (!isset($plugins[$plugin]) || !$plugins[$plugin]->manage($verb, $args)) {
         Request::redirect(null, null, 'plugins');
     }
 }
开发者ID:Jouper,项目名称:jouper,代码行数:14,代码来源:PluginHandler.inc.php

示例10: validate

 /**
  * The site setting option 'preventManagerPluginManagement' must not be set for
  * journal managers to be able to manage plugins.
  * @param $request PKPRequest
  */
 function validate($request)
 {
     parent::validate();
     if (!Validation::isSiteAdmin()) {
         $site =& $request->getSite();
         $preventManagerPluginManagement = $site->getSetting('preventManagerPluginManagement');
         if ($preventManagerPluginManagement) {
             $request->redirect(null, 'manager', 'plugins');
         }
     }
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:16,代码来源:PluginManagementHandler.inc.php

示例11: validate

 /**
  * Validate that user has permissions to manage e-mail templates.
  * Redirects to user index page if not properly authenticated.
  * @param $request PKPRequest
  */
 function validate(&$request)
 {
     parent::validate();
     $schedConf =& $request->getSchedConf();
     // If the user is a Conference Manager, but has specified a scheduled conference,
     // redirect so no scheduled conference is present (otherwise they would end up managing
     // scheduled conference e-mails.)
     if ($schedConf && !Validation::isConferenceManager()) {
         $request->redirect(null, 'index', $request->getRequestedPage(), $request->getRequestedOp());
     }
     return true;
 }
开发者ID:artkuo,项目名称:ocs,代码行数:17,代码来源:EmailHandler.inc.php

示例12: reloadLocalizedDefaultSettings

 function reloadLocalizedDefaultSettings()
 {
     // make sure the locale is valid
     $locale = Request::getUserVar('localeToLoad');
     if (!Locale::isLocaleValid($locale)) {
         Request::redirect(null, null, 'languages');
     }
     parent::validate();
     parent::setupTemplate(true);
     $journal =& Request::getJournal();
     $journalSettingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
     $journalSettingsDao->reloadLocalizedDefaultSettings($journal->getJournalId(), 'registry/journalSettings.xml', array('indexUrl' => Request::getIndexUrl(), 'journalPath' => $journal->getData('path'), 'primaryLocale' => $journal->getPrimaryLocale(), 'journalName' => $journal->getTitle($journal->getPrimaryLocale())), $locale);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign(array('currentUrl' => Request::url(null, null, 'languages'), 'pageTitle' => 'common.languages', 'message' => 'common.changesSaved', 'backLink' => Request::url(null, Request::getRequestedPage()), 'backLinkLabel' => 'manager.journalManagement'));
     $templateMgr->display('common/message.tpl');
 }
开发者ID:Jouper,项目名称:jouper,代码行数:16,代码来源:JournalLanguagesHandler.inc.php

示例13: saveLanguageSettings

 /**
  * Save changes to language settings.
  */
 function saveLanguageSettings()
 {
     parent::validate();
     parent::setupTemplate(true);
     import('manager.form.LanguageSettingsForm');
     $settingsForm =& new LanguageSettingsForm();
     $settingsForm->readInputData();
     if ($settingsForm->validate()) {
         $settingsForm->execute();
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->assign(array('currentUrl' => Request::url(null, null, 'languages'), 'pageTitle' => 'common.languages', 'message' => 'common.changesSaved', 'backLink' => Request::url(null, Request::getRequestedPage()), 'backLinkLabel' => 'manager.journalManagement'));
         $templateMgr->display('common/message.tpl');
     } else {
         $settingsForm->display();
     }
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:19,代码来源:JournalLanguagesHandler.inc.php

示例14: importexport

 function importexport($args)
 {
     parent::validate();
     parent::setupTemplate(true);
     PluginRegistry::loadCategory(IMPORTEXPORT_PLUGIN_CATEGORY);
     $templateMgr =& TemplateManager::getManager();
     if (array_shift($args) === 'plugin') {
         $pluginName = array_shift($args);
         $plugin =& PluginRegistry::getPlugin(IMPORTEXPORT_PLUGIN_CATEGORY, $pluginName);
         if ($plugin) {
             return $plugin->display($args);
         }
     }
     $templateMgr->assign_by_ref('plugins', PluginRegistry::getPlugins(IMPORTEXPORT_PLUGIN_CATEGORY));
     $templateMgr->assign('helpTopicId', 'journal.managementPages.importExport');
     $templateMgr->display('manager/importexport/plugins.tpl');
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:17,代码来源:ImportExportHandler.inc.php

示例15: setupTemplate

 function setupTemplate($subclass = false, $reviewForm = null)
 {
     parent::setupTemplate(true);
     if ($subclass) {
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'reviewForms'), 'manager.reviewForms'));
     }
     if ($reviewForm) {
         $templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'editReviewForm', $reviewForm->getReviewFormId()), $reviewForm->getReviewFormTitle(), true));
     }
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:11,代码来源:ReviewFormHandler.inc.php


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