1 | <?php |
||
2 | /** |
||
3 | * Minify plugin for Craft CMS |
||
4 | * |
||
5 | * @link https://nystudio107.com/ |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
6 | * @copyright Copyright (c) nystudio107 |
||
0 ignored issues
–
show
|
|||
7 | * @license MIT License https://opensource.org/licenses/MIT |
||
8 | */ |
||
0 ignored issues
–
show
|
|||
9 | |||
10 | namespace nystudio107\minify\models; |
||
11 | |||
12 | use craft\base\Model; |
||
13 | |||
14 | /** |
||
15 | * Minify Settings model |
||
16 | * |
||
17 | * @author nystudio107 |
||
0 ignored issues
–
show
Content of the @author tag must be in the form "Display Name <[email protected]>"
![]() |
|||
18 | * @package Minify |
||
0 ignored issues
–
show
|
|||
19 | * @since 1.2.0 |
||
0 ignored issues
–
show
|
|||
20 | */ |
||
0 ignored issues
–
show
|
|||
21 | class Settings extends Model |
||
22 | { |
||
23 | // Public Properties |
||
24 | // ========================================================================= |
||
25 | |||
26 | /** |
||
27 | * If set to `true` then Minify will not minify anything |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | public bool $disableTemplateMinifying = false; |
||
32 | |||
33 | /** |
||
34 | * If set to `true` then Minify will not minify anything if `devMode` is enabled |
||
35 | * |
||
36 | * @var bool |
||
37 | */ |
||
38 | public bool $disableDevModeMinifying = true; |
||
39 | |||
40 | |||
41 | // Public Methods |
||
42 | // ========================================================================= |
||
43 | |||
44 | /** |
||
0 ignored issues
–
show
|
|||
45 | * @inheritdoc |
||
46 | */ |
||
0 ignored issues
–
show
|
|||
47 | public function rules(): array |
||
48 | { |
||
49 | return [ |
||
50 | ['disableTemplateMinifying', 'boolean'], |
||
51 | ['disableTemplateMinifying', 'default', 'value' => false], |
||
52 | ['disableDevModeMinifying', 'boolean'], |
||
53 | ['disableDevModeMinifying', 'default', 'value' => true], |
||
54 | ]; |
||
55 | } |
||
56 | } |
||
57 |