_uploaderRoles = array_keys($roleAssignments); } /** * Get the uploader roles. * * @return array */ public function getUploaderRoles() { assert(is_array($this->_uploaderRoles) && !empty($this->_uploaderRoles)); return $this->_uploaderRoles; } /** * Load only viewable files flag. * * @param bool $viewableOnly */ public function setViewableOnly($viewableOnly) { $this->_viewableOnly = $viewableOnly; } // // Public helper methods // /** * Configures and returns the action to add a file. * * NB: Must be overridden by subclasses (if implemented). * * @param Request $request * * @return AddFileLinkAction */ public function getAddFileAction($request) { assert(false); } /** * Configures and returns the select files action. * * NB: Must be overridden by subclasses (if implemented). * * @param Request $request * * @return SelectFilesLinkAction */ public function getSelectAction($request) { assert(false); } // // Protected helper methods // /** * Get the authorized submission. * * @return Submission */ protected function getSubmission() { return $this->getAuthorizedContextObject(Application::ASSOC_TYPE_SUBMISSION); } }