@@ 368-378 (lines=11) @@ | ||
365 | ||
366 | $result = null; |
|
367 | switch ($workflowActivity) { |
|
368 | case 'initialize': { |
|
369 | $workflowNameParam = $metadata->getWorkflowNameRouterParam(); |
|
370 | $workflowName = $routeMatch->getParam($workflowNameParam, null); |
|
371 | if (null === $workflowName) { |
|
372 | $errMsg = sprintf('Param "%s" not found', $workflowNameParam); |
|
373 | throw new Exception\InvalidArgumentException($errMsg); |
|
374 | } |
|
375 | ||
376 | $result = $this->getWorkflowService()->initialize($workflowManagerName, $workflowName, $workflowActionName, $transientVars); |
|
377 | break; |
|
378 | } |
|
379 | case 'doAction': { |
|
380 | $entryIdParam = $metadata->getEntryIdRouterParam(); |
|
381 | $entryId = $routeMatch->getParam($entryIdParam, null); |
|
@@ 379-389 (lines=11) @@ | ||
376 | $result = $this->getWorkflowService()->initialize($workflowManagerName, $workflowName, $workflowActionName, $transientVars); |
|
377 | break; |
|
378 | } |
|
379 | case 'doAction': { |
|
380 | $entryIdParam = $metadata->getEntryIdRouterParam(); |
|
381 | $entryId = $routeMatch->getParam($entryIdParam, null); |
|
382 | if (null === $entryId) { |
|
383 | $errMsg = sprintf('Param "%s" not found', $entryIdParam); |
|
384 | throw new Exception\InvalidArgumentException($errMsg); |
|
385 | } |
|
386 | ||
387 | $result = $this->getWorkflowService()->doAction($workflowManagerName, $entryId, $workflowActionName, $transientVars); |
|
388 | break; |
|
389 | } |
|
390 | default: { |
|
391 | $errMsg = sprintf('Invalid activity %s', $workflowActivity); |
|
392 | throw new Exception\InvalidArgumentException($errMsg); |