forked from netz98/n98-magerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Helpers
Christian Münch edited this page Jun 15, 2013
·
4 revisions
The Symfony Framework offers a Helper System. http://symfony.com/doc/current/components/console/introduction.html#console-helpers
n98-magerun comes with a list of special helpers for the command line.
Ask Store
Evaluates the parameter "store". As third parameter you can specify a different argument name if it's not the recommended name "store".
$this->getHelper('parameter')->askStore($input, $output);
Ask for website
$this->getHelper('parameter')->askWebsite($input, $output);
Ask for Email
$this->getHelper('parameter')->askEmail($input, $output);
Ask for Password
$this->getHelper('parameter')->askPassword($input, $output);
$table = array();
$table[] = ('line' => '1', 'firstname' => 'Peter');
$table[] = ('line' => '2', 'firstname' => 'Lena');
$this->getHelper('table')->write($output, $table);
Renders a Twig Template. See Twig for configuration options.
$this->getHelper('twig')->render('template_name.twig', array('var1' => 'value1');