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 |
2 | n/a |
0 / 0 |
|||
| register | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | |||||
| 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->registerSingleton( |
| 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 | $app->bound(\Apie\Cms\MenuStructure\MainMenuBuilder::class) ? $app->make(\Apie\Cms\MenuStructure\MainMenuBuilder::class) : null |
| 27 | ); |
| 28 | } |
| 29 | ); |
| 30 | $this->registerSingleton( |
| 31 | \Apie\HtmlBuilders\Factories\FieldDisplayComponentFactory::class, |
| 32 | function ($app) { |
| 33 | return \Apie\HtmlBuilders\Factories\FieldDisplayComponentFactory::create( |
| 34 | $this->getTaggedServicesIterator(\Apie\HtmlBuilders\Interfaces\FieldDisplayComponentProviderInterface::class), |
| 35 | $app->make(\Apie\HtmlBuilders\Columns\ColumnSelector::class) |
| 36 | ); |
| 37 | |
| 38 | } |
| 39 | ); |
| 40 | $this->registerSingleton( |
| 41 | \Apie\HtmlBuilders\Columns\ColumnSelector::class, |
| 42 | function ($app) { |
| 43 | return new \Apie\HtmlBuilders\Columns\ColumnSelector( |
| 44 | |
| 45 | ); |
| 46 | } |
| 47 | ); |
| 48 | $this->registerSingleton( |
| 49 | \Apie\HtmlBuilders\Factories\ResourceActionFactory::class, |
| 50 | function ($app) { |
| 51 | return new \Apie\HtmlBuilders\Factories\ResourceActionFactory( |
| 52 | $app->make(\Apie\Common\ActionDefinitionProvider::class) |
| 53 | ); |
| 54 | } |
| 55 | ); |
| 56 | $this->registerSingleton( |
| 57 | \Apie\HtmlBuilders\Factories\FormComponentFactory::class, |
| 58 | function ($app) { |
| 59 | return \Apie\HtmlBuilders\Factories\FormComponentFactory::create( |
| 60 | $this->getTaggedServicesIterator(\Apie\HtmlBuilders\Interfaces\FormComponentProviderInterface::class) |
| 61 | ); |
| 62 | |
| 63 | } |
| 64 | ); |
| 65 | $this->registerSingleton( |
| 66 | \Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider::class, |
| 67 | function ($app) { |
| 68 | return new \Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider( |
| 69 | $app->make(\Apie\HtmlBuilders\Configuration\ApplicationConfiguration::class) |
| 70 | ); |
| 71 | } |
| 72 | ); |
| 73 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 74 | $this->app, |
| 75 | \Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider::class, |
| 76 | array( |
| 77 | 0 => 'Apie\\HtmlBuilders\\Interfaces\\FormComponentProviderInterface', |
| 78 | ) |
| 79 | ); |
| 80 | $this->app->tag([\Apie\HtmlBuilders\Factories\Concrete\DropdownOptionsComponentProvider::class], \Apie\HtmlBuilders\Interfaces\FormComponentProviderInterface::class); |
| 81 | $this->registerSingleton( |
| 82 | \Apie\HtmlBuilders\Configuration\ApplicationConfiguration::class, |
| 83 | function ($app) { |
| 84 | return new \Apie\HtmlBuilders\Configuration\ApplicationConfiguration( |
| 85 | array( |
| 86 | 'base_url' => '%apie.cms.base_url%', |
| 87 | ) |
| 88 | ); |
| 89 | } |
| 90 | ); |
| 91 | $this->registerSingleton( |
| 92 | \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer::class, |
| 93 | function ($app) { |
| 94 | return new \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer( |
| 95 | $app->make(\Apie\HtmlBuilders\Factories\ComponentFactory::class), |
| 96 | $app->make(\Apie\HtmlBuilders\Interfaces\ComponentRendererInterface::class), |
| 97 | $app->make(\Apie\Common\Interfaces\DashboardContentFactoryInterface::class), |
| 98 | $this->parseArgument('%apie.cms.error_template%', \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer::class, 3), |
| 99 | $this->parseArgument('%kernel.debug%', \Apie\HtmlBuilders\ErrorHandler\CmsErrorRenderer::class, 4) |
| 100 | ); |
| 101 | } |
| 102 | ); |
| 103 | $this->registerSingleton( |
| 104 | \Apie\HtmlBuilders\Assets\AssetManager::class, |
| 105 | function ($app) { |
| 106 | return \Apie\HtmlBuilders\Assets\AssetManager::create( |
| 107 | $this->parseArgument('%apie.cms.asset_folders%') |
| 108 | ); |
| 109 | |
| 110 | } |
| 111 | ); |
| 112 | $this->registerSingleton( |
| 113 | \Apie\HtmlBuilders\Interfaces\ComponentRendererInterface::class, |
| 114 | function ($app) { |
| 115 | return \Apie\Common\Wrappers\CmsRendererFactory::createRenderer( |
| 116 | $app->make(\Apie\HtmlBuilders\Assets\AssetManager::class) |
| 117 | ); |
| 118 | |
| 119 | } |
| 120 | ); |
| 121 | |
| 122 | } |
| 123 | } |