当前位置: 首页>>代码示例>>PHP>>正文


PHP Submission::getId方法代码示例

本文整理汇总了PHP中Submission::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Submission::getId方法的具体用法?PHP Submission::getId怎么用?PHP Submission::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Submission的用法示例。


在下文中一共展示了Submission::getId方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listNotes

 /**
  * List signoff notes.
  * @param $args array
  * @param $request PKPRequest
  * @return string Serialized JSON object
  */
 function listNotes($args, $request)
 {
     $this->setupTemplate($request);
     $templateMgr = TemplateManager::getManager($request);
     $noteDao = DAORegistry::getDAO('NoteDAO');
     $notesFactory = $noteDao->getByAssoc(ASSOC_TYPE_SIGNOFF, $this->_signoff->getId());
     $notes = $notesFactory->toAssociativeArray();
     // Get any note files.
     $noteFilesDownloadLink = array();
     $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
     /** @var $submissionFileDao SubmissionFileDAO */
     import('lib.pkp.controllers.api.file.linkAction.DownloadFileLinkAction');
     foreach ($notes as $noteId => $note) {
         $file = $submissionFileDao->getLatestRevisionsByAssocId(ASSOC_TYPE_NOTE, $noteId, $this->_submission->getId(), SUBMISSION_FILE_NOTE);
         // We don't expect more than one file per note
         $file = current($file);
         // Get the download file link action.
         if ($file) {
             $noteFilesDownloadLink[$noteId] = new DownloadFileLinkAction($request, $file, $this->_stageId);
         }
     }
     $user = $request->getUser();
     import('lib.pkp.classes.core.ArrayItemIterator');
     $templateMgr->assign('notes', new ArrayItemIterator($notes));
     $templateMgr->assign('noteFilesDownloadLink', $noteFilesDownloadLink);
     $templateMgr->assign('notesListId', 'notesList');
     $templateMgr->assign('currentUserId', $user->getId());
     $templateMgr->assign('notesDeletable', false);
     $json = new JSONMessage(true, $templateMgr->fetch('controllers/informationCenter/notesList.tpl'));
     $json->setEvent('dataChanged');
     return $json->getString();
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:38,代码来源:SignoffInformationCenterHandler.inc.php

示例2: getCellActions

 /**
  * @copydoc GridCellProvider::getCellActions()
  */
 function getCellActions($request, $row, $column)
 {
     switch ($column->getId()) {
         case 'contents':
             $element = $row->getData();
             $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
             import('lib.pkp.classes.submission.SubmissionFile');
             $submissionFiles = $submissionFileDao->getLatestRevisionsByAssocId(ASSOC_TYPE_NOTE, $element->getId(), $this->_submission->getId(), SUBMISSION_FILE_QUERY);
             import('lib.pkp.controllers.api.file.linkAction.DownloadFileLinkAction');
             $actions = array();
             foreach ($submissionFiles as $submissionFile) {
                 $actions[] = new DownloadFileLinkAction($request, $submissionFile, $request->getUserVar('stageId'));
             }
             return $actions;
     }
     return parent::getCellActions($request, $row, $column);
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:20,代码来源:QueryNotesGridCellProvider.inc.php

示例3: getCellActions

 /**
  * @copydoc GridCellProvider::getCellActions()
  */
 function getCellActions($request, $row, $column)
 {
     switch ($column->getId()) {
         case 'label':
             $element = $row->getData();
             if ($element->getRemoteUrl() != '' || !$element->getFileId()) {
                 break;
             }
             $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
             import('lib.pkp.classes.submission.SubmissionFile');
             $submissionFiles = $submissionFileDao->getLatestRevisionsByAssocId(ASSOC_TYPE_REPRESENTATION, $element->getId(), $this->_submission->getId(), SUBMISSION_FILE_PROOF);
             import('lib.pkp.controllers.api.file.linkAction.DownloadFileLinkAction');
             $actions = array();
             foreach ($submissionFiles as $submissionFile) {
                 $actions[] = new DownloadFileLinkAction($request, $submissionFile, $request->getUserVar('stageId'), $element->getLabel());
             }
             return $actions;
     }
     return parent::getCellActions($request, $row, $column);
 }
开发者ID:selwyntcy,项目名称:ojs,代码行数:23,代码来源:ArticleGalleyGridCellProvider.inc.php

示例4: getInsertData

 /**
  * converts an object to insert/update data
  *
  * @return a comma separated string e.g. "a=1,b=2"
  */
 public function getInsertData($doubleEscaped = false)
 {
     $values = '';
     if ($this->id !== null) {
         $this->addInsertData($values, 'M_id', DBJson::mysql_real_escape_string($this->id));
     }
     if ($this->tutorId !== null) {
         $this->addInsertData($values, 'U_id_tutor', DBJson::mysql_real_escape_string($this->tutorId));
     }
     if ($this->file != null && $this->file->getFileId() !== null) {
         $this->addInsertData($values, 'F_id_file', DBJson::mysql_real_escape_string($this->file->getFileId()));
     }
     if ($this->submission !== null && $this->submission->getId() !== null) {
         $this->addInsertData($values, 'S_id', DBJson::mysql_real_escape_string($this->submission->getId()));
     }
     if ($this->tutorComment !== null) {
         $this->addInsertData($values, 'M_tutorComment', DBJson::mysql_real_escape_string($this->tutorComment));
     }
     if ($this->outstanding !== null) {
         $this->addInsertData($values, 'M_outstanding', DBJson::mysql_real_escape_string($this->outstanding));
     }
     if ($this->status !== null) {
         $this->addInsertData($values, 'M_status', DBJson::mysql_real_escape_string($this->status));
     }
     if ($this->points !== null) {
         $this->addInsertData($values, 'M_points', DBJson::mysql_real_escape_string($this->points));
     }
     if ($this->date !== null) {
         $this->addInsertData($values, 'M_date', DBJson::mysql_real_escape_string($this->date));
     }
     if ($this->hideFile !== null) {
         $this->addInsertData($values, 'M_hideFile', DBJson::mysql_real_escape_string($this->hideFile));
     }
     if ($values != '') {
         $values = substr($values, 1);
     }
     return $doubleEscaped ? DBJson::mysql_real_escape_string($values) : $values;
 }
开发者ID:sawh,项目名称:ostepu-system,代码行数:43,代码来源:Marking.php

示例5: array

 /**
  * Get an array representing link parameters that subclasses
  * need to have passed to their various handlers (i.e. submission ID
  * to the delete note handler).
  * @return array
  */
 function _getLinkParams()
 {
     return array('submissionId' => $this->_submission->getId());
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:10,代码来源:InformationCenterHandler.inc.php

示例6: array

 /**
  * Check for roles that give access to the passed workflow stage.
  * @param int $userId
  * @param int $contextId
  * @param Submission $submission
  * @param int $stageId
  * @return array
  */
 function _getAccessibleStageRoles($userId, $contextId, &$submission, $stageId)
 {
     $stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO');
     /* @var $stageAssignmentDao StageAssignmentDAO */
     $userRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
     $accessibleStageRoles = array();
     foreach ($userRoles as $roleId) {
         switch ($roleId) {
             case ROLE_ID_MANAGER:
                 // Context managers have access to all submission stages.
                 $accessibleStageRoles[] = $roleId;
                 break;
             case ROLE_ID_ASSISTANT:
             case ROLE_ID_SUB_EDITOR:
             case ROLE_ID_AUTHOR:
                 // The requested workflow stage has been assigned to them
                 // in the requested submission.
                 $stageAssignments = $stageAssignmentDao->getBySubmissionAndRoleId($submission->getId(), $roleId, $stageId, $userId);
                 if (!$stageAssignments->wasEmpty()) {
                     $accessibleStageRoles[] = $roleId;
                 }
                 if ($roleId == ROLE_ID_SUB_EDITOR) {
                     // The requested submission must be part of their section/series...
                     // and the requested workflow stage must be assigned to
                     // them in the context settings.
                     import('lib.pkp.classes.security.authorization.internal.SectionAssignmentRule');
                     $userGroupDao = DAORegistry::getDAO('UserGroupDAO');
                     if (SectionAssignmentRule::effect($contextId, $submission->getSectionId(), $userId) && $userGroupDao->userAssignmentExists($contextId, $userId, $stageId)) {
                         $accessibleStageRoles[] = $roleId;
                     }
                 }
                 break;
             default:
                 break;
         }
     }
     return $accessibleStageRoles;
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:46,代码来源:UserAccessibleWorkflowStageRequiredPolicy.inc.php

示例7: array

 /**
  * Check for roles that give access to the passed workflow stage.
  * @param int $userId
  * @param int $contextId
  * @param Submission $submission
  * @param int $stageId
  * @return array
  */
 function _getAccessibleStageRoles($userId, $contextId, &$submission, $stageId)
 {
     $stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO');
     /* @var $stageAssignmentDao StageAssignmentDAO */
     $userRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
     $accessibleStageRoles = array();
     foreach ($userRoles as $roleId) {
         switch ($roleId) {
             case ROLE_ID_MANAGER:
                 // Context managers have access to all submission stages.
                 $accessibleStageRoles[] = $roleId;
                 break;
             case ROLE_ID_ASSISTANT:
             case ROLE_ID_SUB_EDITOR:
             case ROLE_ID_AUTHOR:
                 // The requested workflow stage has been assigned to them
                 // in the requested submission.
                 $stageAssignments = $stageAssignmentDao->getBySubmissionAndRoleId($submission->getId(), $roleId, $stageId, $userId);
                 if (!$stageAssignments->wasEmpty()) {
                     $accessibleStageRoles[] = $roleId;
                 }
                 break;
             default:
                 break;
         }
     }
     return $accessibleStageRoles;
 }
开发者ID:pkp,项目名称:pkp-lib,代码行数:36,代码来源:UserAccessibleWorkflowStageRequiredPolicy.inc.php

示例8: _removeUploadTaskNotification

 /**
  * Clear potential tasks that may have been assigned to certain
  * users on certain stages.  Right now, just LAYOUT uploads on the production stage.
  * @param Submission $submission
  * @param int $task
  * @param PKRequest $request
  */
 private function _removeUploadTaskNotification($submission, $task, $request)
 {
     // if this is a submission by a LAYOUT_EDITOR for a submission in production, check
     // to see if there is a task notification for that and if so, clear it.
     $currentStageId = $this->getStageId();
     $notificationMgr = new NotificationManager();
     if ($currentStageId == WORKFLOW_STAGE_ID_PRODUCTION) {
         $user = $request->getUser();
         $stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO');
         $userGroupDao = DAORegistry::getDAO('UserGroupDAO');
         $stageAssignments = $stageAssignmentDao->getBySubmissionAndStageId($submission->getId(), $this->getStageId(), null, $user->getId());
         while ($stageAssignment = $stageAssignments->next()) {
             $userGroup = $userGroupDao->getById($stageAssignment->getUserGroupId());
             if (in_array($userGroup->getRoleId(), array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT))) {
                 $notificationDao = DAORegistry::getDAO('NotificationDAO');
                 $notificationDao->deleteByAssoc(ASSOC_TYPE_SUBMISSION, $submission->getId(), $user->getId(), $task);
                 return;
             }
         }
     }
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:28,代码来源:PKPStageParticipantNotifyForm.inc.php

示例9: getRequestArgs

 /**
  * Get request arguments.
  * @param $row GridRow
  * @return array
  */
 function getRequestArgs($row)
 {
     return array('submissionId' => $this->_submission->getId(), 'stageId' => $this->_stageId, 'queryId' => $row->getId());
 }
开发者ID:primoz-svetek,项目名称:pkp-lib,代码行数:9,代码来源:QueriesGridCellProvider.inc.php

示例10: getRequestArgs

 /**
  * Get request arguments.
  * @param $row GridRow
  * @return array
  */
 function getRequestArgs($row)
 {
     return array('submissionId' => $this->_submission->getId());
 }
开发者ID:pkp,项目名称:ojs,代码行数:9,代码来源:ArticleGalleyGridCellProvider.inc.php


注:本文中的Submission::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。