Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
MockCitationGridHandler.inc.php
1 <?php
16 import('lib.pkp.classes.handler.PKPHandler');
17 
18 // Define a test role.
19 if (!defined('ROLE_ID_AUTHOR')) {
20  define('ROLE_ID_AUTHOR', 0x00010000);
21 }
22 
23 class CitationGridHandler extends PKPHandler {
24  private $_fetchArgs;
25 
26  function CitationGridHandler() {
27  $this->_checks = array();
28  // Make sure that the parent constructor
29  // will not be called.
30 
31  // Assign operations to roles.
32  $this->addRoleAssignment(ROLE_ID_AUTHOR, 'fetch');
33  }
34 
35  function authorize() {
36  return true;
37  }
38 
39  function fetchGrid() {
40  // Log the call to the fetch method
41  assert(is_null($this->_fetchArgs));
42  $this->_fetchArgs = func_get_args();
43  }
44 
45  function &getFetchArgs() {
46  // Return the arguments that were passed
47  // to the fetch call (if any)
48  return $this->_fetchArgs;
49  }
50 }
51 ?>
authorize($request, &$args, $roleAssignments)
addRoleAssignment($roleIds, $operations)
Handle OJS specific parts of citation grid requests.