mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-27 09:48:55 +02:00
Allow parameter configuration on the Task configuration definition.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user