@@ -12,22 +12,22 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | use OopTools; |
| 14 | 14 | |
| 15 | - public $snippet; |
|
| 16 | - public $count; |
|
| 17 | - public $cache; |
|
| 15 | + public $snippet; |
|
| 16 | + public $count; |
|
| 17 | + public $cache; |
|
| 18 | 18 | |
| 19 | 19 | public function init() |
| 20 | 20 | { |
| 21 | - $cfg = $this->getConfigs(); |
|
| 22 | - if ($this->snippet === null) { |
|
| 23 | - $this->snippet = $cfg['snippet']; |
|
| 24 | - } |
|
| 25 | - if ($this->count === null) { |
|
| 26 | - $this->count = $cfg['count']; |
|
| 27 | - } |
|
| 28 | - if ($this->cache === null) { |
|
| 29 | - $this->cache = $cfg['cache']; |
|
| 30 | - } |
|
| 21 | + $cfg = $this->getConfigs(); |
|
| 22 | + if ($this->snippet === null) { |
|
| 23 | + $this->snippet = $cfg['snippet']; |
|
| 24 | + } |
|
| 25 | + if ($this->count === null) { |
|
| 26 | + $this->count = $cfg['count']; |
|
| 27 | + } |
|
| 28 | + if ($this->cache === null) { |
|
| 29 | + $this->cache = $cfg['cache']; |
|
| 30 | + } |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function display() |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | return __('Comments not yet found'); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - return App::$View->render('widgets/newcomment/default', [ |
|
| 53 | - 'records' => $records, |
|
| 54 | - 'snippet' => $this->snippet |
|
| 55 | - ]); |
|
| 52 | + return App::$View->render('widgets/newcomment/default', [ |
|
| 53 | + 'records' => $records, |
|
| 54 | + 'snippet' => $this->snippet |
|
| 55 | + ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | private function makeQuery() |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * Set default values from configs |
|
| 27 | - */ |
|
| 26 | + * Set default values from configs |
|
| 27 | + */ |
|
| 28 | 28 | public function before() |
| 29 | 29 | { |
| 30 | 30 | $this->snippet = (int)$this->_configs['snippet']; |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * Labels for form display |
|
| 37 | - */ |
|
| 36 | + * Labels for form display |
|
| 37 | + */ |
|
| 38 | 38 | public function labels() |
| 39 | 39 | { |
| 40 | 40 | return [ |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * Settings validation rules |
|
| 49 | - */ |
|
| 48 | + * Settings validation rules |
|
| 49 | + */ |
|
| 50 | 50 | public function rules() |
| 51 | 51 | { |
| 52 | 52 | return [ |