• Main Page
  • Modules
  • Classes
  • Files
  • File List

controllers/grid/files/attachment/EditorSelectableReviewAttachmentsGridHandler.inc.php

00001 <?php
00002 
00015 import('controllers.grid.files.fileList.SelectableFileListGridHandler');
00016 
00017 class EditorSelectableReviewAttachmentsGridHandler extends SelectableFileListGridHandler {
00021    function EditorSelectableReviewAttachmentsGridHandler() {
00022       import('controllers.grid.files.review.ReviewGridDataProvider');
00023       // Pass in null stageId to be set in initialize from request var.
00024       parent::SelectableFileListGridHandler(
00025          new ReviewGridDataProvider(MONOGRAPH_FILE_REVIEW_ATTACHMENT),
00026          null,
00027          FILE_GRID_DELETE|FILE_GRID_VIEW_NOTES
00028       );
00029 
00030       $this->addRoleAssignment(
00031          array(ROLE_ID_PRESS_MANAGER, ROLE_ID_SERIES_EDITOR, ROLE_ID_PRESS_ASSISTANT),
00032          array('fetchGrid', 'fetchRow')
00033       );
00034 
00035       // Set the grid title.
00036       $this->setTitle('grid.reviewAttachments.title');
00037 
00038       $this->setInstructions('editor.monograph.selectAttachments');
00039    }
00040 
00041 
00042    //
00043    // Overridden protected methods from SelectableFileListGridHandler
00044    //
00048    function getSelectName() {
00049       return 'selectedAttachments';
00050    }
00051 
00055    function getSelectedFileIds($submissionFiles) {
00056       $returner = array();
00057       foreach ($submissionFiles as $fileData) {
00058          $file =& $fileData['submissionFile'];
00059          if ($file->getViewable()) {
00060             $returner[] = $file->getFileIdAndRevision();
00061          }
00062          unset($file);
00063       }
00064       return $returner;
00065    }
00066 }
00067 
00068 ?>

Generated on Mon Sep 17 2012 13:58:55 for Open Monograph Press by  doxygen 1.7.1