Skip to content

Commit

Permalink
Added App::uses to the PluginAppController and PluginAppModel bake te…
Browse files Browse the repository at this point in the history
…mplates
  • Loading branch information
jroberts0001 authored and rchavik committed Jan 20, 2013
1 parent db81276 commit e8647d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Console/Command/Task/PluginTask.php
Expand Up @@ -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);
Expand Down

0 comments on commit e8647d7

Please sign in to comment.