Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…mplates
  • Loading branch information...
commit e8647d77ebd3db79ae051e55eca2907b762df924 1 parent db81276
jroberts0001 authored rchavik committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/Cake/Console/Command/Task/PluginTask.php
View
2  lib/Cake/Console/Command/Task/PluginTask.php
@@ -145,6 +145,7 @@ 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);
@@ -152,6 +153,7 @@ public function bake($plugin) {
$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);
Please sign in to comment.
Something went wrong with that request. Please try again.