| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | trait ServicesTrait |
||
| 25 | { |
||
| 26 | // Public Methods |
||
| 27 | // ========================================================================= |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | public function __construct($id, $parent = null, array $config = []) |
||
| 33 | { |
||
| 34 | // Merge in the passed config, so it our config can be overridden by Plugins::pluginConfigs['vite'] |
||
| 35 | // ref: https://github.com/craftcms/cms/issues/1989 |
||
| 36 | $config = ArrayHelper::merge([ |
||
| 37 | 'components' => [ |
||
| 38 | 'routes' => RoutesService::class, |
||
| 39 | ], |
||
| 40 | ], $config); |
||
| 41 | |||
| 42 | parent::__construct($id, $parent, $config); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Returns the routes service |
||
| 47 | * |
||
| 48 | * @return RoutesService The routes service |
||
| 49 | * @throws InvalidConfigException |
||
| 50 | */ |
||
| 51 | public function getRoutes(): RoutesService |
||
| 54 | } |
||
| 55 | } |
||
| 56 |