mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Added App::uses to the PluginAppController and PluginAppModel bake templates
This commit is contained in:
parent
db8127626a
commit
e8647d77eb
1 changed files with 2 additions and 0 deletions
|
@ -145,6 +145,7 @@ class PluginTask extends AppShell {
|
|||
$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 @@ class PluginTask extends AppShell {
|
|||
$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);
|
||||
|
|
Loading…
Reference in a new issue