/** * Main function called by shell */ function execute() { parent::loadTasks(); // Get the array of actions to bake the views for $actions = $this->getActions(); // Get the array of controllers to bake the selected views for $controllerNames = $this->ControllerMultiple->getNames(); // For each controller foreach ($controllerNames as $controllerName) { // Set ViewTask properties in preparation for bake $this->controllerName = $controllerName; $this->controllerPath = low(Inflector::underscore($controllerName)); // Foreach selected action, bake the view for it foreach ($actions as $action) { $this->template = $action; $this->bake($action, true); } $this->hr(); } $this->out(__("View Baking Complete.\n", true)); }
/** * get the option parser. * * @return void */ public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->addOption('plugin', array('short' => 'l', 'help' => __d('cake_console', 'Plugin.')))->addOption('appTestCase', array('short' => 'z', 'help' => __d('cake_console', 'App test case.')))->addOption('noAppTestCase', array('short' => 'n', 'help' => __d('cake_console', 'App test case.')))->addOption('slug', array('short' => 's', 'boolean' => true, 'help' => __d('cake_console', 'Use slug.')))->addOption('parentSlug', array('short' => 'f', 'boolean' => true, 'help' => __d('cake_console', 'Use slug.')))->addOption('user', array('short' => 'u', 'help' => __d('cake_console', 'Use user model.')))->addOption('parent', array('short' => 'r', 'help' => __d('cake_console', 'Use parent model.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'theme.')))->addOption('subthemes', array('short' => 'b', 'help' => __d('cake_console', 'subthemes.')))->addOption('property', array('short' => 'y', 'boolean' => true, 'help' => __d('cake_console', 'generate IDE properties hints for model relations')))->addOption('public', array('short' => 'p', 'help' => __d('cake_console', 'public controller action')))->addOption('admin', array('short' => 'a', 'help' => __d('cake_console', 'admin controller action'))); }
public function execute() { parent::execute(); }