public function generate() { $this->menuContents .= $this->menuTemplate . infy_nl(); file_put_contents($this->path, $this->menuContents); $this->commandData->commandComment("\n" . $this->commandData->config->mCamelPlural . ' menu added.'); }
public function generateScaffoldItems() { if (!$this->isSkip('requests') and !$this->isSkip('scaffold_requests')) { $requestGenerator = new RequestGenerator($this->commandData); $requestGenerator->generate(); } if (!$this->isSkip('controllers') and !$this->isSkip('scaffold_controller')) { $controllerGenerator = new ControllerGenerator($this->commandData); $controllerGenerator->generate(); } if (!$this->isSkip('views')) { $viewGenerator = new ViewGenerator($this->commandData); $viewGenerator->generate(); } if (!$this->isSkip('routes') and !$this->isSkip('scaffold_routes')) { $routeGenerator = new RoutesGenerator($this->commandData); $routeGenerator->generate(); } if (!$this->isSkip('menu') and $this->commandData->config->getAddOn('menu.enabled')) { $menuGenerator = new MenuGenerator($this->commandData); $menuGenerator->generate(); } }