Browse Source

missing plugin error with new plugin way

saeid 7 years ago
parent
commit
a6501f74a4
1 changed files with 7 additions and 13 deletions
  1. 7 13
      src/Template/Error/missing_plugin.ctp

+ 7 - 13
src/Template/Error/missing_plugin.ctp

@@ -34,22 +34,16 @@ $this->start('subheading');
 <?php
 $code = <<<PHP
 <?php
-Plugin::load('{$plugin}');
+// src/Application.php
+public function bootstrap()
+{
+    parent::bootstrap();
+
+    \$this->addPlugin('{$plugin}');
+}
 PHP;
 
 ?>
 <div class="code-dump"><?php highlight_string($code) ?></div>
 
-<p class="notice">
-    <strong>Loading all plugins: </strong>
-    <?= sprintf('If you wish to load all plugins at once, use the following line in your %s file', 'config' . DIRECTORY_SEPARATOR . 'bootstrap.php'); ?>
-</p>
-
-<?php
-$code = <<<PHP
-<?php
-Plugin::loadAll();
-PHP;
-?>
-<div class="code-dump"><?php highlight_string($code) ?></div>
 <?php $this->end() ?>