From b14625accbc66e08516a8608e38530da9007dfef Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 22 Apr 2021 16:45:12 +0100 Subject: [PATCH] Add new classes to bootstrap --- src/Domain/Bootstrap.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Domain/Bootstrap.php b/src/Domain/Bootstrap.php index e34576a864f..22637eace4b 100644 --- a/src/Domain/Bootstrap.php +++ b/src/Domain/Bootstrap.php @@ -1,10 +1,10 @@ add_build_notice(); $this->container->get( AssetDataRegistry::class ); $this->container->get( Installer::class ); - BlockAssets::init(); + $this->container->get( AssetsController::class ); } $this->container->get( DraftOrders::class )->init(); $this->container->get( CreateAccount::class )->init(); @@ -89,7 +89,7 @@ protected function init() { $this->container->get( PaymentsApi::class ); $this->container->get( RestApi::class ); $this->container->get( GoogleAnalytics::class ); - Library::init(); + $this->container->get( BlockTypesController::class ); } /** @@ -157,6 +157,12 @@ function( Container $container ) { return new AssetDataRegistry( $container->get( AssetApi::class ) ); } ); + $this->container->register( + AssetsController::class, + function( Container $container ) { + return new AssetsController( $container->get( AssetApi::class ) ); + } + ); $this->container->register( PaymentMethodRegistry::class, function( Container $container ) { @@ -183,6 +189,14 @@ function ( Container $container ) { return new Installer(); } ); + $this->container->register( + BlockTypesController::class, + function ( Container $container ) { + $asset_api = $container->get( AssetApi::class ); + $asset_data_registry = $container->get( AssetDataRegistry::class ); + return new BlockTypesController( $asset_api, $asset_data_registry ); + } + ); $this->container->register( DraftOrders::class, function( Container $container ) {