Skip to content

Commit

Permalink
Remove App::objects() call.
Browse files Browse the repository at this point in the history
Using bake templates now requires you to load a plugin. I don't see this
as a huge obstacle if you want to use templates from a plugin. This also
fixes issues where plugins not using `src/` would not work with
TemplateTask.
  • Loading branch information
markstory committed Aug 16, 2014
1 parent 3c00ea4 commit a02794a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Console/Command/Task/TemplateTask.php
Expand Up @@ -16,6 +16,7 @@

use Cake\Console\Shell;
use Cake\Core\App;
use Cake\Core\Plugin;
use Cake\Utility\ConventionsTrait;
use Cake\Utility\Folder;
use Cake\View\ViewVarsTrait;
Expand Down Expand Up @@ -57,9 +58,9 @@ public function initialize() {
protected function _findTemplates() {
$paths = App::path('Template');

$plugins = App::objects('Plugin');
$plugins = Plugin::loaded();
foreach ($plugins as $plugin) {
$paths[] = $this->_pluginPath($plugin) . 'src' . DS . 'Template' . DS;
$paths[] = Plugin::classPath($plugin) . DS . 'Template' . DS;
}

$core = current(App::core('Template'));
Expand Down

0 comments on commit a02794a

Please sign in to comment.