Permalink
Browse files

Added App::uses to the PluginAppController and PluginAppModel bake te…

…mplates
  • Loading branch information...
jroberts0001 authored and rchavik committed Jan 15, 2013
1 parent db81276 commit e8647d77ebd3db79ae051e55eca2907b762df924
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Console/Command/Task/PluginTask.php
@@ -145,13 +145,15 @@ public function bake($plugin) {
$controllerFileName = $plugin . 'AppController.php';
$out = "<?php\n\n";
$out .= "App::uses('AppController', 'Controller');\n\n";
$out .= "class {$plugin}AppController extends AppController {\n\n";
$out .= "}\n\n";
$this->createFile($this->path . $plugin . DS . 'Controller' . DS . $controllerFileName, $out);
$modelFileName = $plugin . 'AppModel.php';
$out = "<?php\n\n";
$out .= "App::uses('AppModel', 'Model');\n\n";
$out .= "class {$plugin}AppModel extends AppModel {\n\n";
$out .= "}\n\n";
$this->createFile($this->path . $plugin . DS . 'Model' . DS . $modelFileName, $out);

0 comments on commit e8647d7

Please sign in to comment.