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