missing_layout.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 0.10.0
  13. * @license https://opensource.org/licenses/mit-license.php MIT License
  14. * @var string $file
  15. * @var array<string> $paths
  16. */
  17. $this->layout = 'dev_error';
  18. $this->assign('title', 'Missing Layout');
  19. $this->assign('templateName', 'missing_layout.php');
  20. $this->start('subheading');
  21. ?>
  22. <strong>Error</strong>
  23. The layout file <em><?= h($file) ?></em> can not be found or does not exist.
  24. <?php $this->end() ?>
  25. <?php $this->start('file') ?>
  26. <p>
  27. Confirm you have created the file: <?= h($file) ?> in one of the following paths:
  28. </p>
  29. <ul>
  30. <?php
  31. foreach ($paths as $path):
  32. if (strpos($path, CORE_PATH) !== false) {
  33. continue;
  34. }
  35. echo sprintf('<li>%s%s</li>', h($path), h($file));
  36. endforeach;
  37. ?>
  38. </ul>
  39. <?php $this->end() ?>