Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| HtmlBuilderServiceProvider | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||
| register | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| 1 | <?php |
| 2 | namespace Apie\HtmlBuilders; |
| 3 | |
| 4 | use Apie\ServiceProviderGenerator\UseGeneratedMethods; |
| 5 | use Illuminate\Support\ServiceProvider; |
| 6 | |
| 7 | /** |
| 8 | * This file is generated with apie/service-provider-generator from file: html_builders.yaml |
| 9 | * @codeCoverageIgnore |
| 10 | */ |
| 11 | class HtmlBuilderServiceProvider extends ServiceProvider |
| 12 | { |
| 13 | use UseGeneratedMethods; |
| 14 | |
| 15 | public function register() |
| 16 | { |
| 17 | $this->app->singleton( |
| 18 | \Apie\HtmlBuilders\Factories\ComponentFactory::class, |
| 19 | function ($app) { |
| 20 | return new \Apie\HtmlBuilders\Factories\ComponentFactory( |
| 21 | $app->make(\Apie\HtmlBuilders\Configuration\ApplicationConfiguration::class), |
| 22 | $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class), |
| 23 | $app->make(\Apie\HtmlBuilders\Factories\FormComponentFactory::class), |
| 24 | $app->make(\Apie\HtmlBuilders\Factories\FieldDisplayComponentFactory::class), |
| 25 | $app->make(\Apie\HtmlBuilders\Factories\ResourceActionFactory::class) |
| 26 | ); |
| 27 | } |
| 28 | ); |
| 29 | $this->app->singleton( |
| 30 | \Apie\HtmlBuilders\Factories\FieldDisplayComponentFactory::class, |
| 31 | function ($app) { |
| 32 | return \Apie\HtmlBuilders\Factories\FieldDisplayComponentFactory::create( |
| 33 | $this->getTaggedServicesIterator(\Apie\HtmlBuilders\Interfaces\FieldDisplayComponentProviderInterface::class), |
| 34 | $app->make(\Apie\HtmlBuilders\Columns\ColumnSelector::class) |
| 35 | ); |
| 36 | |
| 37 | } |
| 38 | ); |
| 39 | $this->app->singleton( |
| 40 | \Apie\HtmlBuilders\Columns\ColumnSelector::class, |
| 41 | function ($app) { |
| 42 | return new \Apie\HtmlBuilders\Columns\ColumnSelector( |
| 43 | |
| 44 | ); |
| 45 | } |
| 46 | ); |
| 47 | $this->app->singleton( |
| 48 | \Apie\HtmlBuilders\Factories\ResourceActionFactory::class, |
| 49 | function ($app) { |
| 50 | return new \Apie\HtmlBuilders\Factories\ResourceActionFactory( |
| 51 | $app->make(\Apie\Common\ActionDefinitionProvider::class) |
| 52 | ); |
| 53 | } |
| 54 | ); |
| 55 | $this->app->singleton( |
| 56 | \Apie\HtmlBuilders\Factories\FormComponentFactory::class, |
| 57 | function ($app) { |
| 58 | return \Apie\HtmlBuilders\Factories\FormComponentFactory::create( |
| 59 | $this->getTaggedServicesIterator(\Apie\HtmlBuilders\Interfaces\FormComponentProviderInterface::class) |
| 60 | ); |
| 61 | |
| 62 | } |
| 63 | ); |
| 64 | $this->app->singleton( |
| 65 | \Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider::class, |
| 66 | function ($app) { |
| 67 | return new \Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider( |
| 68 | $app->make(\Apie\HtmlBuilders\Configuration\ApplicationConfiguration::class) |
| 69 | ); |
| 70 | } |
| 71 | ); |
| 72 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 73 | $this->app, |
| 74 | \Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider::class, |
| 75 | array( |
| 76 | 0 => 'Apie\\HtmlBuilders\\Interfaces\\FormComponentProviderInterface', |
| 77 | ) |
| 78 | ); |
| 79 | $this->app->tag([\Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider::class], \Apie\HtmlBuilders\Interfaces\FormComponentProviderInterface::class); |
| 80 | $this->app->singleton( |
| 81 | \Apie\HtmlBuilders\Configuration\ApplicationConfiguration::class, |
| 82 | function ($app) { |
| 83 | return new \Apie\HtmlBuilders\Configuration\ApplicationConfiguration( |
| 84 | array( |
| 85 | 'base_url' => '%apie.cms.base_url%', |
| 86 | ) |
| 87 | ); |
| 88 | } |
| 89 | ); |
| 90 | $this->app->singleton( |
| 91 | \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer::class, |
| 92 | function ($app) { |
| 93 | return new \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer( |
| 94 | $app->make(\Apie\HtmlBuilders\Factories\ComponentFactory::class), |
| 95 | $app->make(\Apie\HtmlBuilders\Interfaces\ComponentRendererInterface::class), |
| 96 | $app->make(\Apie\Common\Interfaces\DashboardContentFactoryInterface::class), |
| 97 | $this->parseArgument('%apie.cms.error_template%', \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer::class, 3), |
| 98 | $this->parseArgument('%kernel.debug%', \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer::class, 4) |
| 99 | ); |
| 100 | } |
| 101 | ); |
| 102 | $this->app->singleton( |
| 103 | \Apie\HtmlBuilders\Assets\AssetManager::class, |
| 104 | function ($app) { |
| 105 | return \Apie\HtmlBuilders\Assets\AssetManager::create( |
| 106 | $this->parseArgument('%apie.cms.asset_folders%') |
| 107 | ); |
| 108 | |
| 109 | } |
| 110 | ); |
| 111 | $this->app->singleton( |
| 112 | \Apie\HtmlBuilders\Interfaces\ComponentRendererInterface::class, |
| 113 | function ($app) { |
| 114 | return \Apie\Common\Wrappers\CmsRendererFactory::createRenderer( |
| 115 | $app->make(\Apie\HtmlBuilders\Assets\AssetManager::class) |
| 116 | ); |
| 117 | |
| 118 | } |
| 119 | ); |
| 120 | |
| 121 | } |
| 122 | } |