/**
  * Extracts variables for a given column from a data element
  * so that they may be assigned to template before rendering.
  *
  * @copydoc DataObjectGridCellProvider::getTemplateVarsFromRowColumn()
  */
 function getTemplateVarsFromRowColumn($row, $column)
 {
     $publishedIssue = $row->getData();
     $columnId = $column->getId();
     assert(is_a($publishedIssue, 'Issue') && !empty($columnId));
     switch ($columnId) {
         case 'identification':
             return array('label' => '');
         case 'published':
             return array('label' => $publishedIssue->getDatePublished());
         case 'pubId':
             return array('label' => $publishedIssue->getStoredPubId($this->_plugin->getPubIdType()));
         case 'status':
             $status = $publishedIssue->getData($this->_plugin->getDepositStatusSettingName());
             $statusNames = $this->_plugin->getStatusNames();
             $statusActions = $this->_plugin->getStatusActions($publishedIssue);
             if ($status) {
                 if (array_key_exists($status, $statusActions)) {
                     $label = '';
                 } else {
                     assert(array_key_exists($status, $statusNames));
                     $label = $statusNames[$status];
                 }
             } else {
                 $label = $statusNames[DOI_EXPORT_STATUS_NOT_DEPOSITED];
             }
             return array('label' => $label);
     }
 }
 /**
  * Extracts variables for a given column from a data element
  * so that they may be assigned to template before rendering.
  *
  * @copydoc DataObjectGridCellProvider::getTemplateVarsFromRowColumn()
  */
 function getTemplateVarsFromRowColumn($row, $column)
 {
     $publishedSubmissionGalley = $row->getData();
     $columnId = $column->getId();
     assert(is_a($publishedSubmissionGalley, 'ArticleGAlley') && !empty($columnId));
     switch ($columnId) {
         case 'id':
             return array('label' => $publishedSubmissionGalley->getId());
         case 'title':
             return array('label' => '');
         case 'issue':
             return array('label' => '');
         case 'galley':
             return array('label' => $publishedSubmissionGalley->getGalleyLabel());
         case 'pubId':
             return array('label' => $publishedSubmissionGalley->getStoredPubId($this->_plugin->getPubIdType()));
         case 'status':
             $status = $publishedSubmissionGalley->getData($this->_plugin->getDepositStatusSettingName());
             $statusNames = $this->_plugin->getStatusNames();
             $statusActions = $this->_plugin->getStatusActions($publishedSubmissionGalley);
             if ($status) {
                 if (array_key_exists($status, $statusActions)) {
                     $label = '';
                 } else {
                     assert(array_key_exists($status, $statusNames));
                     $label = $statusNames[$status];
                 }
             } else {
                 $label = $statusNames[DOI_EXPORT_STATUS_NOT_DEPOSITED];
             }
             return array('label' => $label);
     }
 }
 /**
  * @copydoc GridHandler::loadData()
  */
 protected function loadData($request, $filter)
 {
     $context = $request->getContext();
     list($statusId) = $this->getFilterValues($filter);
     $pubIdStatusSettingName = null;
     if ($statusId) {
         $pubIdStatusSettingName = $this->_plugin->getDepositStatusSettingName();
     }
     $issueDao = DAORegistry::getDAO('IssueDAO');
     return $issueDao->getByPubIdType($this->_plugin->getPubIdType(), $context ? $context->getId() : null, $pubIdStatusSettingName, $statusId, $this->getGridRangeInfo($request, $this->getId()));
 }
 /**
  * @copydoc GridHandler::loadData()
  */
 protected function loadData($request, $filter)
 {
     $articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
     $context = $request->getContext();
     list($search, $column, $issueId, $statusId) = $this->getFilterValues($filter);
     $title = $author = null;
     if ($column == 'title') {
         $title = $search;
     } elseif ($column == 'author') {
         $author = $search;
     }
     $pubIdStatusSettingName = null;
     if ($statusId) {
         $pubIdStatusSettingName = $this->_plugin->getDepositStatusSettingName();
     }
     return $articleGalleyDao->getByPubIdType($this->_plugin->getPubIdType(), $context ? $context->getId() : null, $title, $author, $issueId, $pubIdStatusSettingName, $statusId, $this->getGridRangeInfo($request, $this->getId()));
 }