VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: borro on February 13, 2018, 12:00:58 PM

Title: How to declare a task?
Post by: borro on February 13, 2018, 12:00:58 PM
Hello!

I'm debugging my code. Now the cursor in the \libraries\legacy\controller\legacy.php and the program check the presense of my own created task in $this->taskMap variable($this is the instance of VirtuemartControllerCategory). How to add my own task to this->taskMap array?
Title: Re: How to declare a task?
Post by: Studio 42 on February 13, 2018, 17:38:23 PM
You don't need to add something, taskMap is needed if you use 2 task for 1 function.
Eg apply and save task to use function save
If you overide a controller class and add a new function mytask then it work if you use link task=mytask
Title: Re: How to declare a task?
Post by: borro on February 14, 2018, 09:50:08 AM
thank you!