Search code examples
phpsymfony-1.4propel

How to create custom SQL Propel Task for Symfony Task?


I want to insert data into a Table with a for-loop. First of all I have create a Symfony Task with:

symfony generate:task namespace:MyTask

now I'm trying to generate a propel sql task that I can call into my Symfony Task so that when I call :

symfony namespaceMyTask

it insert an amount of for(i=10; i < 30; i++) Data into a Table.

How can I create a custom propel task that can be call into a symfony task?


Solution

  • It's in the doc under "Executing a Task inside a Task".

    $this->runTask('namespaceMyTask');