Open Journal Systems  3.3.0
ToolsHandler.inc.php
1 <?php
2 
16 // Import the base ManagementHandler.
17 import('lib.pkp.pages.management.PKPToolsHandler');
18 
20 
24  protected function getReportRowValue($key, $record) {
25  $returnValue = parent::getReportRowValue($key, $record);
26 
27  if (!$returnValue && $key == STATISTICS_DIMENSION_ISSUE_ID) {
28  $assocId = $record[STATISTICS_DIMENSION_ISSUE_ID];
29  $assocType = ASSOC_TYPE_ISSUE;
30  $returnValue = $this->getObjectTitle($assocId, $assocType);
31  }
32 
33  return $returnValue;
34  }
35 
36 
40  protected function getObjectTitle($assocId, $assocType) {
41  $objectTitle = parent::getObjectTitle($assocId, $assocType);
42 
43  switch ($assocType) {
44  case ASSOC_TYPE_ISSUE:
45  $issueDao = DAORegistry::getDAO('IssueDAO'); /* @var $issueDao IssueDAO */
46  $issue = $issueDao->getById($assocId);
47  if ($issue) {
48  $objectTitle = $issue->getIssueIdentification();
49  }
50  break;
51  }
52 
53  return $objectTitle;
54  }
55 }
56 
57 
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
ToolsHandler
Implement application specifics on handling requests for Tool pages.
Definition: ToolsHandler.inc.php:19
ToolsHandler\getReportRowValue
getReportRowValue($key, $record)
Definition: ToolsHandler.inc.php:24
ToolsHandler\getObjectTitle
getObjectTitle($assocId, $assocType)
Definition: ToolsHandler.inc.php:40
PKPToolsHandler
Handle requests for Tool pages.
Definition: PKPToolsHandler.inc.php:21