@@ -240,6 +240,9 @@ |
||
240 | 240 | $this->panels = $this->loadPanels(array_keys($this->panels)); |
241 | 241 | } |
242 | 242 | |
243 | + /** |
|
244 | + * @param ActionEvent $event |
|
245 | + */ |
|
243 | 246 | public function shouldTrack($event, $isError = false) |
244 | 247 | { |
245 | 248 | $trackActions = $isError ? $this->trackErrorActions : $this->trackActions; |
@@ -10,9 +10,9 @@ |
||
10 | 10 | |
11 | 11 | namespace bedezign\yii2\audit; |
12 | 12 | |
13 | +use Yii; |
|
13 | 14 | use bedezign\yii2\audit\components\panels\Panel; |
14 | 15 | use bedezign\yii2\audit\models\AuditEntry; |
15 | -use Yii; |
|
16 | 16 | use yii\base\ActionEvent; |
17 | 17 | use yii\base\Application; |
18 | 18 | use yii\base\InvalidConfigException; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | // Things required to keep the module yii2-debug compatible |
177 | 177 | /* @see \yii\debug\Module::$traceLine (since 2.0.7) */ |
178 | 178 | public $traceLine = \yii\debug\Module::DEFAULT_IDE_TRACELINE; |
179 | - /* @see \yii\debug\Module::$tracePathMappings (since 2.1.6) */ |
|
179 | + /* @see \yii\debug\Module::$tracePathMappings (since 2.1.6) */ |
|
180 | 180 | public $tracePathMappings = []; |
181 | 181 | |
182 | 182 | /** |
@@ -350,9 +350,9 @@ discard block |
||
350 | 350 | // This code assumes the audit module is already loaded and can thus look for a derived instance |
351 | 351 | $loadedModules = Yii::$app->loadedModules; |
352 | 352 | foreach ($loadedModules as $module) { |
353 | - if ($module instanceof self) { |
|
354 | - return self::$_me = $module; |
|
355 | - } |
|
353 | + if ($module instanceof self) { |
|
354 | + return self::$_me = $module; |
|
355 | + } |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | // If we're still here, fall back onto the default implementation |
@@ -482,12 +482,12 @@ discard block |
||
482 | 482 | |
483 | 483 | // We now need one more iteration to add core classes to the panels added via the merge, if needed |
484 | 484 | array_walk($this->panels, function(&$value, $key) { |
485 | - if (!isset($value['class'])) { |
|
486 | - if (isset($this->_corePanels[$key])) |
|
487 | - $value = ArrayHelper::merge($value, $this->_corePanels[$key]); |
|
488 | - else |
|
489 | - throw new InvalidConfigException("Invalid configuration for '$key'. No 'class' specified."); |
|
490 | - } |
|
485 | + if (!isset($value['class'])) { |
|
486 | + if (isset($this->_corePanels[$key])) |
|
487 | + $value = ArrayHelper::merge($value, $this->_corePanels[$key]); |
|
488 | + else |
|
489 | + throw new InvalidConfigException("Invalid configuration for '$key'. No 'class' specified."); |
|
490 | + } |
|
491 | 491 | }); |
492 | 492 | } |
493 | 493 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /* @var $panel bedezign\yii2\audit\panels\SoapPanel */ |
3 | 3 | |
4 | -use yii\helpers\Html; |
|
5 | 4 | use bedezign\yii2\audit\components\Helper; |
5 | +use bedezign\yii2\audit\components\web\Helper as WebHelper; |
|
6 | 6 | use yii\helpers\ArrayHelper; |
7 | +use yii\helpers\Html; |
|
7 | 8 | use yii\helpers\VarDumper; |
8 | -use bedezign\yii2\audit\components\web\Helper as WebHelper; |
|
9 | 9 | |
10 | 10 | $preformatted = ['class' => 'well', 'style' => 'overflow: auto; white-space: pre']; |
11 | 11 | $formatter = \Yii::$app->formatter; |
@@ -38,7 +38,7 @@ |
||
38 | 38 | unset($request['result']); |
39 | 39 | } |
40 | 40 | |
41 | -$tabs[] = [ 'label' => \Yii::t('audit', 'Info'), 'content' => $this->render('info_table', ['request' => $request]), 'active' => true ]; |
|
41 | +$tabs[] = ['label' => \Yii::t('audit', 'Info'), 'content' => $this->render('info_table', ['request' => $request]), 'active' => true]; |
|
42 | 42 | |
43 | 43 | echo Html::tag('h2', \Yii::t('audit', 'Request #{id}', ['id' => $index])), |
44 | 44 | WebHelper::bootstrap('Tabs', 'widget', ['items' => array_reverse($tabs)]); |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | use bedezign\yii2\audit\Audit; |
6 | 6 | use bedezign\yii2\audit\components\panels\Panel; |
7 | -use bedezign\yii2\audit\web\JSLoggingAsset; |
|
8 | 7 | use bedezign\yii2\audit\components\web\Helper as WebHelper; |
8 | +use bedezign\yii2\audit\web\JSLoggingAsset; |
|
9 | 9 | use yii\debug\DebugAsset; |
10 | 10 | use yii\helpers\Html; |
11 | 11 | use yii\widgets\Breadcrumbs; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $this->title = Yii::t('audit', 'Mail #{id}', ['id' => $model->id]); |
12 | 12 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; |
13 | 13 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Mails'), 'url' => ['index']]; |
14 | -$this->params['breadcrumbs'][] = '#' . $model->id; |
|
14 | +$this->params['breadcrumbs'][] = '#'.$model->id; |
|
15 | 15 | |
16 | 16 | if (Audit::getInstance()->hasMethod('renderEmail')) { |
17 | 17 | Audit::getInstance()->renderEmail($this, $model); |
@@ -21,5 +21,5 @@ discard block |
||
21 | 21 | $parser->setText($model->data); |
22 | 22 | echo $parser->getMessageBody('htmlEmbedded'); |
23 | 23 | } else { |
24 | - echo Html::tag('pre', $model->data) . Html::tag('br') . 'Please register a renderEmail panel function or install php-mime-mail-parser for better functionality'; |
|
24 | + echo Html::tag('pre', $model->data).Html::tag('br').'Please register a renderEmail panel function or install php-mime-mail-parser for better functionality'; |
|
25 | 25 | } |
@@ -15,8 +15,7 @@ |
||
15 | 15 | |
16 | 16 | if (Audit::getInstance()->hasMethod('renderEmail')) { |
17 | 17 | Audit::getInstance()->renderEmail($this, $model); |
18 | -} |
|
19 | -elseif (class_exists('\PhpMimeMailParser\Parser')) { |
|
18 | +} elseif (class_exists('\PhpMimeMailParser\Parser')) { |
|
20 | 19 | $parser = new \PhpMimeMailParser\Parser(); |
21 | 20 | $parser->setText($model->data); |
22 | 21 | echo $parser->getMessageBody('htmlEmbedded'); |