Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| CmsServiceProvider | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| register | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\LaravelApie\Providers; |
| 3 | |
| 4 | use Apie\Cms\CmsServiceProvider as CmsCmsServiceProvider; |
| 5 | use Apie\HtmlBuilders\Configuration\ApplicationConfiguration; |
| 6 | use Apie\LaravelApie\Wrappers\Cms\DashboardContents; |
| 7 | |
| 8 | class CmsServiceProvider extends CmsCmsServiceProvider |
| 9 | { |
| 10 | public function register() |
| 11 | { |
| 12 | parent::register(); |
| 13 | |
| 14 | // symfony equivalent: sf_cms.yaml |
| 15 | $this->app->bind('apie.cms.dashboard_content', DashboardContents::class); |
| 16 | // blade extensions? |
| 17 | |
| 18 | $this->app->bind(DashboardContents::class, function () { |
| 19 | return new DashboardContents( |
| 20 | config('apie.cms.dashboard_template'), |
| 21 | [] |
| 22 | ); |
| 23 | }); |
| 24 | |
| 25 | // workaround against apie/service-provider-generator not parsing parameters in arrays |
| 26 | $this->app->singleton(ApplicationConfiguration::class, function () { |
| 27 | return new ApplicationConfiguration([ |
| 28 | 'base_url' => config('apie.cms.base_url'), |
| 29 | ]); |
| 30 | }); |
| 31 | } |
| 32 | } |