Allow parameter configuration on the Task configuration definition.

This commit is contained in:
Andrés Montañez
2012-09-23 19:33:10 -03:00
parent 811c83e13a
commit 969caa0bbb
8 changed files with 81 additions and 18 deletions
@@ -17,5 +17,8 @@ tasks:
- privileges
- sampleTask
- sampleTaskRollbackAware
- taskWithParameters:
booleanOption: true
- taskWithParameters
#post-release
#post-deploy:
@@ -8,7 +8,7 @@ class Task_SampleTask
}
public function run()
{
{
return true;
}
}
@@ -0,0 +1,20 @@
<?php
class Task_TaskWithParameters
extends Mage_Task_TaskAbstract
{
public function getName()
{
$booleanOption = $this->getParameter('booleanOption', false);
if ($booleanOption) {
return 'A Sample Task With Parameters [booleanOption=true]';
} else {
return 'A Sample Task With Parameters [booleanOption=false]';
}
}
public function run()
{
return true;
}
}