@@ -14,27 +14,27 @@ discard block |
||
14 | 14 | { |
15 | 15 | use OopTools; |
16 | 16 | |
17 | - public $snippet; |
|
18 | - public $count; |
|
19 | - public $cache; |
|
17 | + public $snippet; |
|
18 | + public $count; |
|
19 | + public $cache; |
|
20 | 20 | |
21 | - /** |
|
22 | - * Set default configs if not passed |
|
23 | - * {@inheritDoc} |
|
24 | - * @see \Ffcms\Core\Arch\Widget::init() |
|
25 | - */ |
|
21 | + /** |
|
22 | + * Set default configs if not passed |
|
23 | + * {@inheritDoc} |
|
24 | + * @see \Ffcms\Core\Arch\Widget::init() |
|
25 | + */ |
|
26 | 26 | public function init() |
27 | 27 | { |
28 | - $cfg = $this->getConfigs(); |
|
29 | - if ($this->snippet === null) { |
|
30 | - $this->snippet = $cfg['snippet']; |
|
31 | - } |
|
32 | - if ($this->count === null) { |
|
33 | - $this->count = $cfg['count']; |
|
34 | - } |
|
35 | - if ($this->cache === null) { |
|
36 | - $this->cache = $cfg['cache']; |
|
37 | - } |
|
28 | + $cfg = $this->getConfigs(); |
|
29 | + if ($this->snippet === null) { |
|
30 | + $this->snippet = $cfg['snippet']; |
|
31 | + } |
|
32 | + if ($this->count === null) { |
|
33 | + $this->count = $cfg['count']; |
|
34 | + } |
|
35 | + if ($this->cache === null) { |
|
36 | + $this->cache = $cfg['cache']; |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | // render view |
66 | - return App::$View->render('widgets/newcomment/default', [ |
|
67 | - 'records' => $records, |
|
68 | - 'snippet' => $this->snippet |
|
69 | - ]); |
|
66 | + return App::$View->render('widgets/newcomment/default', [ |
|
67 | + 'records' => $records, |
|
68 | + 'snippet' => $this->snippet |
|
69 | + ]); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | <ul class="list-inline list-info"> |
23 | 23 | <li><i class="fa fa-calendar"></i> <?= $data['date'] ?></li> |
24 | 24 | <li><i class="fa fa-user"></i> |
25 | - <?php if ((int)$data['user']['id'] > 0): ?> |
|
25 | + <?php if ((int) $data['user']['id'] > 0): ?> |
|
26 | 26 | <?= Url::link(['profile/show', $data['user']['id']], $data['user']['name']) ?> |
27 | 27 | <?php else: ?> |
28 | 28 | <?= $data['user']['name'] ?> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | <img class="media-object img-responsive" src="<?= $data['user']['avatar']?>" style="width: 64px; height: 64px;" alt="Picture of user <?= $data['user']['name'] ?>"> |
36 | 36 | </span> |
37 | 37 | <div class="media-body"> |
38 | - <a href="<?= \App::$Alias->baseUrl . $data['pathway'] . '#comment-list' ?>"><?= $data['text'] ?></a> |
|
38 | + <a href="<?= \App::$Alias->baseUrl.$data['pathway'].'#comment-list' ?>"><?= $data['text'] ?></a> |
|
39 | 39 | </div> |
40 | 40 | </li> |
41 | 41 | </ul> |