本文整理汇总了PHP中Handler::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Handler::initialize方法的具体用法?PHP Handler::initialize怎么用?PHP Handler::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Handler
的用法示例。
在下文中一共展示了Handler::initialize方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request, $args = null)
{
parent::initialize($request, $args);
// Fetch and store information for later use
$this->_submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
$this->_stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);
$this->_signoff = $this->getAuthorizedContextObject(ASSOC_TYPE_SIGNOFF);
}
示例2: initialize
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request, $args)
{
$router = $request->getRouter();
$operation = $router->getRequestedOp($request);
if ($operation != 'access') {
$this->setupTemplate($request);
}
// Call parent method.
parent::initialize($request, $args);
}
示例3: initialize
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request, $args = null)
{
parent::initialize($request, $args);
$this->_submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
$this->_stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);
$this->_tabPosition = (int) $request->getUserVar('tabPos');
// Load grid-specific translations
AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_APP_SUBMISSION);
$this->setupTemplate($request);
}
示例4: initialize
/**
* @see PKPHandler::initialize()
*/
function initialize(&$request, $args)
{
$this->setupTemplate();
$templateMgr =& TemplateManager::getManager();
// Assign the authorized monograph.
$monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
$templateMgr->assign_by_ref('monograph', $monograph);
// Assign the stage id.
$stageId = $this->_identifyStageId($request);
$templateMgr->assign('stageId', $stageId);
// Call parent method.
parent::initialize($request, $args);
}
示例5: initialize
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request, $args)
{
parent::initialize($request, $args);
// Configure the wizard with the authorized submission and file stage.
// Validated in authorize.
$this->_fileStage = (int) $request->getUserVar('fileStage');
// Set the uploader roles (if given).
$uploaderRoles = $request->getUserVar('uploaderRoles');
if (!empty($uploaderRoles)) {
$this->_uploaderRoles = array();
$uploaderRoles = explode('-', $uploaderRoles);
foreach ($uploaderRoles as $uploaderRole) {
if (!is_numeric($uploaderRole)) {
fatalError('Invalid uploader role!');
}
$this->_uploaderRoles[] = (int) $uploaderRole;
}
}
// Set the uploader group IDs (if given).
$uploaderGroupIds = $request->getUserVar('uploaderGroupIds');
if (!empty($uploaderGroupIds)) {
$this->_uploaderGroupIds = array();
$uploaderGroupIds = explode('-', $uploaderGroupIds);
foreach ($uploaderGroupIds as $uploaderGroupId) {
if (!is_numeric($uploaderGroupId)) {
fatalError('Invalid uploader group ID!');
}
$this->_uploaderGroupIds[] = (int) $uploaderGroupId;
}
}
// Do we allow revisions only?
$this->_revisionOnly = (bool) $request->getUserVar('revisionOnly');
$reviewRound = $this->getReviewRound();
$this->_assocType = $request->getUserVar('assocType') ? (int) $request->getUserVar('assocType') : null;
$this->_assocId = $request->getUserVar('assocId') ? (int) $request->getUserVar('assocId') : null;
// The revised file will be non-null if we revise a single existing file.
if ($this->getRevisionOnly() && $request->getUserVar('revisedFileId')) {
// Validated in authorize.
$this->_revisedFileId = (int) $request->getUserVar('revisedFileId');
}
// Load translations.
AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APP_COMMON);
}
示例6: initialize
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request, $args = null)
{
parent::initialize($request, $args);
$this->_submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
$this->setupTemplate($request);
}
示例7: initialize
/**
* Fetch and store away objects
* @param $request PKPRequest
* @param $args array optional
*/
function initialize($request, $args = null)
{
parent::initialize($request, $args);
// Fetch the submission and file to display information about
$this->_submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
}
示例8: initialize
/**
* Initialize the handler.
* @param $request PKPRequest
* @param $args array
*/
function initialize($request, $args = null)
{
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_ADMIN, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_APP_ADMIN, LOCALE_COMPONENT_APP_COMMON);
return parent::initialize($request, $args);
}
示例9: initialize
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request, $args)
{
$this->setupTemplate($request);
// Call parent method.
parent::initialize($request, $args);
}
示例10: initialize
/**
* @see PKPHandler::initialize()
*/
function initialize(&$request, $args = null)
{
parent::initialize($request, $args);
// Load grid-specific translations
Locale::requireComponents(array(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OMP_MANAGER));
}
示例11: initialize
/**
* @see PKPHandler::initialize()
*/
function initialize($request, $args = null)
{
parent::initialize($request, $args);
// Load manager locale components.
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_PKP_GRID);
}
示例12: initialize
/**
* @see PKPHandler::initialize()
*/
function initialize($request, $args)
{
parent::initialize($request, $args);
}