Open Journal Systems  3.3.0
ArticleHandler Class Reference
Inheritance diagram for ArticleHandler:
Handler PKPHandler

Public Member Functions

 authorize ($request, &$args, $roleAssignments)
 
 download ($args, $request)
 
 downloadSuppFile ($args, $request)
 
 initialize ($request, $args=array())
 
 setupTemplate ($request)
 
 userCanViewGalley ($request, $articleId, $galleyId=null)
 
 view ($args, $request)
 
 viewFile ($args, $request)
 
- Public Member Functions inherited from PKPHandler
 __construct ()
 
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 getApiToken ()
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getSiteRedirectContext ($request)
 
 getTargetContext ($request, &$contextsCount=null)
 
 index ($args, $request)
 
 initialize ($request)
 
 markRoleAssignmentsChecked ()
 
 requireSSL ()
 
 setApiToken ($apiToken)
 
 setDispatcher ($dispatcher)
 
 setEnforceRestrictedSite ($enforceRestrictedSite)
 
 setId ($id)
 
 validate ($requiredContexts=null, $request=null)
 

Data Fields

 $article
 
 $categories
 
 $context
 
 $fileId
 
 $galley
 
 $issue
 
 $publication
 
- Data Fields inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_enforceRestrictedSite = true
 
 $_id
 
 $_isBackendPage = false
 
 $_roleAssignments = array()
 
 $_roleAssignmentsChecked = false
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 
- Protected Attributes inherited from PKPHandler
 $_apiToken = null
 

Detailed Description

Handle requests for article functions.

Definition at line 21 of file ArticleHandler.inc.php.

Member Function Documentation

◆ authorize()

ArticleHandler::authorize (   $request,
$args,
  $roleAssignments 
)

Authorize this request.

Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.

NB: This method will be called once for every request only.

Parameters
$requestRequest
$argsarray request arguments
$roleAssignmentsarray the operation role assignment, see getRoleAssignment() for more details.
Returns
boolean

Reimplemented from PKPHandler.

Definition at line 47 of file ArticleHandler.inc.php.

References PKPHandler\addPolicy(), Config\getVar(), and PKPHandler\setApiToken().

◆ download()

ArticleHandler::download (   $args,
  $request 
)

Download an article file

Parameters
array$args
PKPRequest$request

Definition at line 371 of file ArticleHandler.inc.php.

References HookRegistry\call(), DAORegistry\getDAO(), and userCanViewGalley().

◆ downloadSuppFile()

ArticleHandler::downloadSuppFile (   $args,
  $request 
)

Download a supplementary file. For deprecated OJS 2.x URLs; see https://github.com/pkp/pkp-lib/issues/1541

Parameters
$argsarray
$requestPKPRequest

Definition at line 339 of file ArticleHandler.inc.php.

References $article, PKPServices\get(), and DAORegistry\getDAO().

◆ initialize()

ArticleHandler::initialize (   $request,
  $args = array() 
)
See also
PKPHandler::initialize()
Parameters
$argsarray Arguments list

Definition at line 70 of file ArticleHandler.inc.php.

References $galley, $publication, PKPServices\get(), and DAORegistry\getDAO().

◆ setupTemplate()

ArticleHandler::setupTemplate (   $request)

Set up the template. (Load required locale components.)

Parameters
$requestPKPRequest

Reimplemented from PKPHandler.

Definition at line 513 of file ArticleHandler.inc.php.

References AppLocale\requireComponents().

Referenced by view().

◆ userCanViewGalley()

ArticleHandler::userCanViewGalley (   $request,
  $articleId,
  $galleyId = null 
)

Determines whether a user can view this article galley or not.

Parameters
$requestRequest
$articleIdstring
$galleyIdint or string

Definition at line 414 of file ArticleHandler.inc.php.

References $article, $context, $issue, PKPApplication\get(), DAORegistry\getDAO(), Validation\isLoggedIn(), and Validation\redirectLogin().

Referenced by download(), and view().

◆ view()

ArticleHandler::view (   $args,
  $request 
)

View Article. (Either article landing page or galley view.)

Parameters
$argsarray
$requestRequest

Definition at line 157 of file ArticleHandler.inc.php.

References $article, $context, $galley, $issue, $publication, HookRegistry\call(), fatalError(), PKPApplication\get(), DAORegistry\getDAO(), PKPTemplateManager\getManager(), PluginRegistry\loadCategory(), setupTemplate(), and userCanViewGalley().

◆ viewFile()

ArticleHandler::viewFile (   $args,
  $request 
)

Download an article file For deprecated OJS 2.x URLs; see https://github.com/pkp/pkp-lib/issues/1541

Parameters
$argsarray
$requestPKPRequest

Definition at line 325 of file ArticleHandler.inc.php.

References $fileId.

Field Documentation

◆ $article

ArticleHandler::$article

submission associated with the request

Definition at line 29 of file ArticleHandler.inc.php.

Referenced by downloadSuppFile(), userCanViewGalley(), and view().

◆ $categories

ArticleHandler::$categories

category associated with the request

Definition at line 32 of file ArticleHandler.inc.php.

◆ $context

ArticleHandler::$context

context associated with the request

Definition at line 23 of file ArticleHandler.inc.php.

Referenced by userCanViewGalley(), and view().

◆ $fileId

ArticleHandler::$fileId

fileId associated with the request

Definition at line 41 of file ArticleHandler.inc.php.

Referenced by viewFile().

◆ $galley

ArticleHandler::$galley

galley associated with the request

Definition at line 38 of file ArticleHandler.inc.php.

Referenced by initialize(), and view().

◆ $issue

ArticleHandler::$issue

issue associated with the request

Definition at line 26 of file ArticleHandler.inc.php.

Referenced by userCanViewGalley(), and view().

◆ $publication

ArticleHandler::$publication

publication associated with the request

Definition at line 35 of file ArticleHandler.inc.php.

Referenced by initialize(), and view().


The documentation for this class was generated from the following file: