Ejemplo n.º 1
0
 /**
  * Displays a single AuditError model.
  * @param integer $id
  * @return mixed
  * @throws \HttpInvalidParamException
  */
 public function actionView($id)
 {
     $model = AuditError::findOne($id);
     if (!$model) {
         throw new \HttpInvalidParamException('Invalid request number specified');
     }
     return $this->render('view', ['model' => $model]);
 }
Ejemplo n.º 2
0
 /**
  * Displays a single AuditError model.
  * @param integer $id
  * @return mixed
  * @throws NotFoundHttpException
  */
 public function actionView($id)
 {
     $model = AuditError::findOne($id);
     if (!$model) {
         throw new NotFoundHttpException('The requested error does not exist.');
     }
     return $this->render('view', ['model' => $model]);
 }
Ejemplo n.º 3
0
<?php

use yii\helpers\Html;
use yii\helpers\VarDumper;
use yii\helpers\Url;
$formatter = \Yii::$app->formatter;
if (isset($request['error']) && isset($request['error'][1])) {
    $error = \bedezign\yii2\audit\models\AuditError::findOne($request['error'][1]);
    $request['error'] = Html::a('[' . $request['error'][0] . '] ' . $error->message, ['error/view', 'id' => $error->id]);
}
?>
<div class="table-responsive">
    <table class="table table-condensed table-bordered table-striped table-hover request-table" style="table-layout: fixed;">
        <thead>
            <tr>
                <th>Name</th>
                <th>Value</th>
            </tr>
        </thead>
        <tbody>
        <?php 
foreach ($request as $name => $value) {
    ?>
            <tr>
                <th><?php 
    echo Html::encode(\yii\helpers\Inflector::humanize($name));
    ?>
</th>
                <td>
<?php 
    if (is_array($value) || is_object($value)) {