18
18
19
19
use APP \components \forms \publication \PublishForm ;
20
20
use APP \core \Application ;
21
- use APP \decision \types \Accept ;
22
- use APP \decision \types \SkipExternalReview ;
23
21
use APP \facades \Repo ;
24
22
use APP \file \PublicFileManager ;
25
23
use APP \publication \Publication ;
26
- use APP \submission \Submission ;
27
24
use APP \template \TemplateManager ;
28
25
use PKP \components \forms \publication \TitleAbstractForm ;
29
26
use PKP \context \Context ;
30
- use PKP \decision \types \BackFromCopyediting ;
31
- use PKP \decision \types \BackFromProduction ;
32
- use PKP \decision \types \CancelReviewRound ;
33
- use PKP \decision \types \Decline ;
34
- use PKP \decision \types \InitialDecline ;
35
- use PKP \decision \types \RecommendAccept ;
36
- use PKP \decision \types \RecommendDecline ;
37
- use PKP \decision \types \RecommendRevisions ;
38
- use PKP \decision \types \RequestRevisions ;
39
- use PKP \decision \types \RevertDecline ;
40
- use PKP \decision \types \RevertInitialDecline ;
41
- use PKP \decision \types \SendExternalReview ;
42
- use PKP \decision \types \SendToProduction ;
43
27
use PKP \notification \Notification ;
44
28
use PKP \pages \workflow \PKPWorkflowHandler ;
45
- use PKP \plugins \Hook ;
46
29
use PKP \security \Role ;
47
30
48
31
class WorkflowHandler extends PKPWorkflowHandler
@@ -58,12 +41,9 @@ public function __construct()
58
41
[Role::ROLE_ID_SUB_EDITOR , Role::ROLE_ID_MANAGER , Role::ROLE_ID_SITE_ADMIN , Role::ROLE_ID_ASSISTANT ],
59
42
[
60
43
'access ' , 'index ' , 'submission ' ,
61
- 'editorDecisionActions ' , // Submission & review
62
44
'externalReview ' , // review
63
45
'editorial ' ,
64
46
'production ' ,
65
- 'submissionHeader ' ,
66
- 'submissionProgressBar ' ,
67
47
]
68
48
);
69
49
}
@@ -211,113 +191,6 @@ protected function getEditorAssignmentNotificationTypeByStageId($stageId)
211
191
return null ;
212
192
}
213
193
214
- protected function _getRepresentationsGridUrl ($ request , $ submission )
215
- {
216
- return $ request ->getDispatcher ()->url (
217
- $ request ,
218
- Application::ROUTE_COMPONENT ,
219
- null ,
220
- 'grid.articleGalleys.ArticleGalleyGridHandler ' ,
221
- 'fetchGrid ' ,
222
- null ,
223
- [
224
- 'submissionId ' => $ submission ->getId (),
225
- 'publicationId ' => '__publicationId__ ' ,
226
- ]
227
- );
228
- }
229
-
230
- protected function getStageDecisionTypes (int $ stageId ): array
231
- {
232
- $ submission = $ this ->getAuthorizedContextObject (Application::ASSOC_TYPE_SUBMISSION );
233
- $ request = Application::get ()->getRequest ();
234
- $ reviewRoundId = (int ) $ request ->getUserVar ('reviewRoundId ' );
235
-
236
- switch ($ stageId ) {
237
- case WORKFLOW_STAGE_ID_SUBMISSION :
238
- $ decisionTypes = [
239
- new SendExternalReview (),
240
- new SkipExternalReview (),
241
- ];
242
- if ($ submission ->getData ('status ' ) === Submission::STATUS_DECLINED ) {
243
- $ decisionTypes [] = new RevertInitialDecline ();
244
- } elseif ($ submission ->getData ('status ' ) === Submission::STATUS_QUEUED ) {
245
- $ decisionTypes [] = new InitialDecline ();
246
- }
247
- break ;
248
- case WORKFLOW_STAGE_ID_EXTERNAL_REVIEW :
249
- $ decisionTypes = [
250
- new RequestRevisions (),
251
- new Accept (),
252
- ];
253
- $ cancelReviewRound = new CancelReviewRound ();
254
- if ($ cancelReviewRound ->canRetract ($ submission , $ reviewRoundId )) {
255
- $ decisionTypes [] = $ cancelReviewRound ;
256
- }
257
- if ($ submission ->getData ('status ' ) === Submission::STATUS_DECLINED ) {
258
- $ decisionTypes [] = new RevertDecline ();
259
- } elseif ($ submission ->getData ('status ' ) === Submission::STATUS_QUEUED ) {
260
- $ decisionTypes [] = new Decline ();
261
- }
262
- break ;
263
- case WORKFLOW_STAGE_ID_EDITING :
264
- $ decisionTypes = [
265
- new SendToProduction (),
266
- new BackFromCopyediting (),
267
- ];
268
- break ;
269
- case WORKFLOW_STAGE_ID_PRODUCTION :
270
- $ decisionTypes = [
271
- new BackFromProduction (),
272
- ];
273
- break ;
274
- }
275
-
276
- Hook::call ('Workflow::Decisions ' , [&$ decisionTypes , $ stageId ]);
277
-
278
- return $ decisionTypes ;
279
- }
280
-
281
- protected function getStageRecommendationTypes (int $ stageId ): array
282
- {
283
- switch ($ stageId ) {
284
- case WORKFLOW_STAGE_ID_EXTERNAL_REVIEW :
285
- $ decisionTypes = [
286
- new RecommendRevisions (),
287
- new RecommendAccept (),
288
- new RecommendDecline (),
289
- ];
290
- break ;
291
- default :
292
- $ decisionTypes = [];
293
- }
294
-
295
-
296
- Hook::call ('Workflow::Recommendations ' , [$ decisionTypes , $ stageId ]);
297
-
298
- return $ decisionTypes ;
299
- }
300
-
301
- protected function getPrimaryDecisionTypes (): array
302
- {
303
- return [
304
- SendExternalReview::class,
305
- Accept::class,
306
- SendToProduction::class,
307
- ];
308
- }
309
-
310
- protected function getWarnableDecisionTypes (): array
311
- {
312
- return [
313
- InitialDecline::class,
314
- Decline::class,
315
- CancelReviewRound::class,
316
- BackFromCopyediting::class,
317
- BackFromProduction::class,
318
- ];
319
- }
320
-
321
194
protected function getTitleAbstractForm (string $ latestPublicationApiUrl , array $ locales , Publication $ latestPublication , Context $ context ): TitleAbstractForm
322
195
{
323
196
$ section = Repo::section ()->get ($ latestPublication ->getData ('sectionId ' ), $ context ->getId ());
0 commit comments