-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.2.13' into v1
- Loading branch information
Showing
12 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/** | ||
* Minify plugin for Craft CMS 3.x | ||
* | ||
* @link https://nystudio107.com/ | ||
* @copyright Copyright (c) nystudio107 | ||
* @license MIT License https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
namespace nystudio107\minify\services; | ||
|
||
use craft\helpers\ArrayHelper; | ||
use yii\base\InvalidConfigException; | ||
|
||
/** | ||
* @author nystudio107 | ||
* @package Minify | ||
* @since 1.2.13 | ||
* | ||
* @property MinifyService $minify | ||
*/ | ||
trait ServicesTrait | ||
{ | ||
// Public Methods | ||
// ========================================================================= | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function __construct($id, $parent = null, array $config = []) | ||
{ | ||
// Merge in the passed config, so it our config can be overridden by Plugins::pluginConfigs['vite'] | ||
// ref: https://github.com/craftcms/cms/issues/1989 | ||
$config = ArrayHelper::merge([ | ||
'components' => [ | ||
'minify' => MinifyService::class, | ||
], | ||
], $config); | ||
|
||
parent::__construct($id, $parent, $config); | ||
} | ||
|
||
/** | ||
* Returns the helper service | ||
* | ||
* @return MinifyService The minify service | ||
* @throws InvalidConfigException | ||
*/ | ||
public function getMinify(): MinifyService | ||
{ | ||
return $this->get('minify'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters