Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
BaseAddFileLinkAction.inc.php
1 <?php
19 import('lib.pkp.classes.linkAction.LinkAction');
20 
22 
41  function BaseAddFileLinkAction($request, $submissionId, $stageId,
42  $uploaderRoles, $uploaderGroupIds, $actionArgs, $wizardTitle, $buttonLabel) {
43 
44  // Augment the action arguments array.
45  $actionArgs['submissionId'] = $submissionId;
46  $actionArgs['stageId'] = $stageId;
47  assert(is_array($uploaderRoles) && count($uploaderRoles) >= 1);
48  $actionArgs['uploaderRoles'] = implode('-', (array) $uploaderRoles);
49  $actionArgs['uploaderGroupIds'] = implode('-', (array) $uploaderGroupIds);
50 
51  // Instantiate the file upload modal.
52  $dispatcher = $request->getDispatcher();
53  import('lib.pkp.classes.linkAction.request.WizardModal');
54  $modal = new WizardModal(
55  $dispatcher->url(
56  $request, ROUTE_COMPONENT, null,
57  'wizard.fileUpload.FileUploadWizardHandler', 'startWizard',
58  null, $actionArgs
59  ),
60  $wizardTitle, 'modal_add_file'
61  );
62 
63  // Configure the link action.
64  parent::LinkAction('addFile', $modal, $buttonLabel, 'add');
65  }
66 }
67 
68 ?>
BaseAddFileLinkAction($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $actionArgs, $wizardTitle, $buttonLabel)
A modal that contains a wizard retrieved via AJAX.
Abstract base class for file upload actions.
Base class defining an action that can be performed by the user in the user interface.