Skip to content

Commit

Permalink
feature: allow runtime params for Process, passed as POST
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi authored and dpfaffenbauer committed Nov 8, 2018
1 parent 7d663a4 commit 3251169
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ProcessManagerBundle/Controller/ExecutableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function runAction(Request $request)
]);
}

$this->get('process_manager.registry.processes')->get($exe->getType())->run($exe);
$this->get('process_manager.registry.processes')->get($exe->getType())->run($exe, $request->request->all());

return $this->viewHandler->handle([
'success' => true
Expand All @@ -79,4 +79,4 @@ protected function getConfigTypes()
{
return $this->getParameter('process_manager.processes');
}
}
}
2 changes: 1 addition & 1 deletion src/ProcessManagerBundle/Process/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class Cli implements ProcessInterface
/**
* {@inheritdoc}
*/
function run(ExecutableInterface $executable) {
function run(ExecutableInterface $executable, array $params = null) {
$settings = $executable->getSettings();
$command = $settings['command'];

Expand Down
2 changes: 1 addition & 1 deletion src/ProcessManagerBundle/Process/Pimcore.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Pimcore implements ProcessInterface
/**
* {@inheritdoc}
*/
function run(ExecutableInterface $executable) {
function run(ExecutableInterface $executable, array $params = null) {
$settings = $executable->getSettings();
$command = $settings['command'];

Expand Down
3 changes: 2 additions & 1 deletion src/ProcessManagerBundle/Process/ProcessInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ interface ProcessInterface
* runs the executable
*
* @param ExecutableInterface $executable
* @param array $params
* @return mixed
*/
function run(ExecutableInterface $executable);
function run(ExecutableInterface $executable, array $params = null);
}

0 comments on commit 3251169

Please sign in to comment.