Author Topic: How to declare a task?  (Read 275 times)

borro

  • Jr. Member
  • **
  • Posts: 207
  • Wish you happiness!
    • web developing, web design
  • VirtueMart Version: a few
How to declare a task?
« 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?
Wish you happiness!

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3243
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: How to declare a task?
« Reply #1 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

borro

  • Jr. Member
  • **
  • Posts: 207
  • Wish you happiness!
    • web developing, web design
  • VirtueMart Version: a few
Re: How to declare a task?
« Reply #2 on: February 14, 2018, 09:50:08 am »
thank you!
Wish you happiness!