| Server IP : 195.134.90.114 / Your IP : 216.73.216.186 Web Server : Apache/2.4.58 System : Linux nepub 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/public_html/lib/pkp/controllers/modals/documentLibrary/ |
Upload File : |
<?php
/**
* @file controllers/modals/documentLibrary/DocumentLibraryHandler.inc.php
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2003-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class DocumentLibraryHandler
* @ingroup controllers_modals_documentLibrary
*
* @brief Submission document library modal handler.
*/
// Import the base Handler.
import('classes.handler.Handler');
class DocumentLibraryHandler extends Handler {
/** The submission **/
var $_submission;
/**
* Constructor.
*/
function __construct() {
parent::__construct();
$this->addRoleAssignment(
array(ROLE_ID_SUB_EDITOR, ROLE_ID_MANAGER, ROLE_ID_AUTHOR, ROLE_ID_ASSISTANT),
array('documentLibrary'));
}
//
// Overridden methods from Handler
//
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request) {
parent::initialize($request);
$this->_submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
$this->setupTemplate($request);
}
/**
* @copydoc PKPHandler::authorize()
*/
function authorize($request, &$args, $roleAssignments) {
import('lib.pkp.classes.security.authorization.SubmissionAccessPolicy');
$this->addPolicy(new SubmissionAccessPolicy($request, $args, $roleAssignments));
return parent::authorize($request, $args, $roleAssignments);
}
//
// Getters and Setters
//
/**
* Get the Submission
* @return Submission
*/
function getSubmission() {
return $this->_submission;
}
//
// Public handler methods
//
/**
* Display a list of the review form elements within a review form.
* @param $args array
* @param $request PKPRequest
* @return JSONMessage JSON object
*/
function documentLibrary($args, $request) {
$templateMgr = TemplateManager::getManager($request);
$templateMgr->assign('submission', $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION));
return $templateMgr->fetchJson('controllers/modals/documentLibrary/documentLibrary.tpl');
}
}