本文整理汇总了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');
}
}
示例2: PluginHandler
/**
* Constructor
*/
function PluginHandler()
{
parent::ManagerHandler();
}
示例3: ManagerPaymentHandler
/**
* Constructor
**/
function ManagerPaymentHandler()
{
parent::ManagerHandler();
}
示例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'));
}
示例5: ApprovalNoticesHandler
/**
* Constructor
**/
function ApprovalNoticesHandler()
{
parent::ManagerHandler();
$this->approvalNoticeDao =& DAORegistry::getDAO('ApprovalNoticeDAO');
}
示例6: TimelineHandler
/**
* Constructor
**/
function TimelineHandler()
{
parent::ManagerHandler();
}
示例7: JournalLanguagesHandler
/**
* Constructor
**/
function JournalLanguagesHandler()
{
parent::ManagerHandler();
}
示例8: FilesHandler
/**
* Constructor
*/
function FilesHandler()
{
parent::ManagerHandler();
}
示例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');
}
}
示例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');
}
}
}
示例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;
}
示例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');
}
示例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();
}
}
示例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');
}
示例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));
}
}