nystudio107 /
craft-fastcgicachebust
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * FastCGI Cache Bust plugin for Craft CMS 3.x |
||
| 4 | * |
||
| 5 | * Bust the Nginx FastCGI Cache when entries are saved or created. |
||
| 6 | * |
||
| 7 | * @link https://nystudio107.com |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 8 | * @copyright Copyright (c) 2017 nystudio107 |
||
|
0 ignored issues
–
show
|
|||
| 9 | */ |
||
|
0 ignored issues
–
show
|
|||
| 10 | |||
| 11 | namespace nystudio107\fastcgicachebust\assetbundles\fastcgicachebust; |
||
| 12 | |||
| 13 | use craft\web\AssetBundle; |
||
| 14 | use craft\web\assets\cp\CpAsset; |
||
| 15 | |||
| 16 | /** |
||
|
0 ignored issues
–
show
|
|||
| 17 | * @author nystudio107 |
||
|
0 ignored issues
–
show
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
|
|||
| 18 | * @package FastcgiCacheBust |
||
|
0 ignored issues
–
show
|
|||
| 19 | * @since 1.0.0 |
||
|
0 ignored issues
–
show
|
|||
| 20 | */ |
||
|
0 ignored issues
–
show
|
|||
| 21 | class FastcgiCacheBustAsset extends AssetBundle |
||
| 22 | { |
||
| 23 | // Public Methods |
||
| 24 | // ========================================================================= |
||
| 25 | |||
| 26 | /** |
||
|
0 ignored issues
–
show
|
|||
| 27 | * @inheritdoc |
||
| 28 | */ |
||
|
0 ignored issues
–
show
|
|||
| 29 | public function init(): void |
||
| 30 | { |
||
| 31 | $this->sourcePath = '@nystudio107/fastcgicachebust/assetbundles/fastcgicachebust/dist'; |
||
| 32 | |||
| 33 | $this->depends = [ |
||
| 34 | CpAsset::class, |
||
| 35 | ]; |
||
| 36 | |||
| 37 | $this->js = [ |
||
| 38 | 'js/FastcgiCacheBust.js', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | $this->css = [ |
||
| 42 | 'css/FastcgiCacheBust.css', |
||
| 43 | ]; |
||
| 44 | |||
| 45 | parent::init(); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |