missing_plugin.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  11. * @link https://cakephp.org CakePHP(tm) Project
  12. * @since 2.0.0
  13. * @license https://opensource.org/licenses/mit-license.php MIT License
  14. * @var string $plugin
  15. */
  16. use Cake\Core\Configure;
  17. $this->layout = 'dev_error';
  18. $pluginPath = Configure::read('App.paths.plugins.0');
  19. $this->assign('title', 'Missing Plugin');
  20. $this->assign('templateName', 'missing_plugin.php');
  21. $this->start('subheading');
  22. ?>
  23. <strong>Error</strong>
  24. The application is trying to load a file from the <em><?= h($plugin) ?></em> plugin.
  25. <br>
  26. <br>
  27. Make sure your plugin <em><?= h($plugin) ?></em> is in the <?= h($pluginPath) ?> directory and was loaded.
  28. <?php $this->end() ?>
  29. <?php $this->start('file') ?>
  30. <?php
  31. $code = <<<PHP
  32. <?php
  33. // src/Application.php
  34. public function bootstrap()
  35. {
  36. parent::bootstrap();
  37. \$this->addPlugin('{$plugin}');
  38. }
  39. PHP;
  40. ?>
  41. <div class="code-dump"><?php highlight_string($code) ?></div>
  42. <?php $this->end() ?>