You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

summary.php 974B

1234567891011121314151617181920212223
  1. <?php
  2. /* @var $panel yii\debug\panels\RequestPanel */
  3. use yii\helpers\Html;
  4. use yii\web\Response;
  5. $statusCode = $panel->data['statusCode'];
  6. if ($statusCode === null) {
  7. $statusCode = 200;
  8. }
  9. if ($statusCode >= 200 && $statusCode < 300) {
  10. $class = 'yii-debug-toolbar__label_success';
  11. } elseif ($statusCode >= 300 && $statusCode < 400) {
  12. $class = 'yii-debug-toolbar__label_info';
  13. } else {
  14. $class = 'yii-debug-toolbar__label_important';
  15. }
  16. $statusText = Html::encode(isset(Response::$httpStatuses[$statusCode]) ? Response::$httpStatuses[$statusCode] : '');
  17. ?>
  18. <div class="yii-debug-toolbar__block">
  19. <a href="<?= $panel->getUrl() ?>" title="Status code: <?= $statusCode ?> <?= $statusText ?>">Status <span class="yii-debug-toolbar__label <?= $class ?>"><?= $statusCode ?></span></a>
  20. <a href="<?= $panel->getUrl() ?>" title="Action: <?= $panel->data['action'] ?>">Route <span class="yii-debug-toolbar__label"><?= $panel->data['route'] ?></span></a>
  21. </div>