@param \Spryker\Zed\Kernel\Container $container

@return \Spryker\Zed\Kernel\Container
482355
public function provideBusinessLayerDependencies(Container $container)
    {
        $container[self::FACADE_PDF] = function (Container $container) {
            return new DocumentToPdfBridge($container->getLocator()->pdf()->facade());
        };

        $container[self::FACADE_FILE_UPLOAD] = function (Container $container) {
            return new DocumentToFileUploadBridge($container->getLocator()->fileUpload()->facade());
        };

        $container[self::PDF_CONVERTER_STACK] = function () {
            return $this->getPdfConverterStack();
        };

        return parent::provideBusinessLayerDependencies($container);
    }
851772
protected function CanEdit(Container $container)
    {
        return self::Guard()->Allow(BackendAction::Edit(), $container)
            && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm());
    }
401227
public static function fromContainer(ContainerInterface $container)
	{
		$obj = $container->get(__CLASS__);

		if ($obj && $obj instanceof static)
			return $obj;

		throw new NotFoundException();
	}
416587
public function register(Container $container)
    {
        $container = $container->getParent();

        // System profiler
        $closure = function (Container $container) {
            $config = $container->get('config');

            if ($config->get('system.debug')) {
                $profiler = new Profiler('windwalker');

                $profiler->setPoint(new Point(
                    'start',
                    $config['execution.start'] ?: microtime(true),
                    $config['execution.memory'] ?: memory_get_usage(true),
                    ['tag' => 'system.process']
                ));

                return $profiler;
            }

            return new NullProfiler();
        };

        $container->share('profiler', $closure);

        // System collector
        $closure = function (Container $container) {
            $config = $container->get('config');

            if ($config->get('system.debug')) {
                return new Structure();
            } else {
                return new NullObject();
            }
        };

        $container->share('debugger.collector', $closure);

        if ($container->get('config')->get('system.debug')) {
            $this->registerProfilerListener($container, $container->get('config'));
            $this->registerDatabaseProfiler($container, $container->get('config'));
            $this->registerEmailProfiler($container, $container->get('config'));
            $this->registerLogsProfiler($container, $container->get('config'));
        }
    }
139559
protected function addZedRequestClient(Container $container): Container
    {
        $container[static::CLIENT_ZED_REQUEST] = function (Container $container) {
            return new CompaniesRestApiToZedRequestClientBridge($container->getLocator()->zedRequest()->client());
        };

        return $container;
    }
812715
public function getContainer(): Container
    {
        if (is_null($this->container)) {
            $this->container = $this->ui()->factory()->getContainer();
        }

        return $this->container;
    }
1302922
public function container($container = null, Closure $callback = null)
    {
        $container = is_null($container) ? $this->defaultContainer : $container;

        if (!isset($this->containers[$container])) {
            $this->addContainer(
                $container,
                $this->getContainerTypes($container),
                $this->getContainerFormat($container),
                $this->getContainerFormats($container)
            );
        }

        if (is_callable($callback)) {
            $callback($this->containers[$container]);
        }

        return $this->containers[$container];
    }
360476
public function make(Container $container)
    {
        $this->container = $container;

        $this->container->call([$this, 'dispatch']);

        $this->register();

        return $this;
    }
56272
protected function addZedRequestClient(Container $container): Container
    {
        $container[static::CLIENT_ZED_REQUEST] = function (Container $container) {
            return new BrandToZedRequestClientBridge($container->getLocator()->zedRequest()->client());
        };

        return $container;
    }
1096687
public function provideBusinessLayerDependencies(Container $container): Container
    {
        $container = parent::provideBusinessLayerDependencies($container);
        $container = $this->addPriceProductFacade($container);
        $container = $this->addUtilEncodingService($container);

        return $container;
    }
92499
protected function addCompanyFacade(Container $container): Container
    {
        $container[static::FACADE_COMPANY] = function (Container $container) {
            return new CompaniesRestApiToCompanyFacadeBridge(
                $container->getLocator()->company()->facade()
            );
        };

        return $container;
    }
415323
public function register(Container $container)
    {
        $container->prepareSharedObject(DatabaseService::class);

        $closure = function (Container $container) {
            $service = $container->get(DatabaseService::class);

            return $service->createConnection();
        };

        class_alias(AbstractDatabaseDriver::class, DatabaseAdapter::class);
        $container->share(AbstractDatabaseDriver::class, $closure)
            ->alias(DatabaseAdapter::class, AbstractDatabaseDriver::class);

        DatabaseContainer::setDb(function () use ($container) {
            return $container->get(AbstractDatabaseDriver::class);
        });

        // For Exporter
        $closure = function (Container $container) {
            $service = $container->get(DatabaseService::class);

            return $service->getExporter();
        };

        $container->share(AbstractExporter::class, $closure);
    }
1165288
public function provideBusinessLayerDependencies(Container $container)
    {
        $container = $this->addQueueAdapter($container);
        $container = $this->addGuzzleClient($container);

        return $container;
    }
522939
public static function prepareContainer(Container $container)
    {
        if ( ! isset($container['config'])) {
            $container['config'] = [];
        }
        if ( ! isset($container['files'])) {
            $container['files'] = new Filesystem();
        }
        if ( ! isset($container['providers'])) {
            $container['providers'] = [];
        }
        $providers = $container['providers'];
        $providers[] = 'Consolet\DefaultCommandsProvider';
        $container['providers'] = $providers;
        return $container;
    }
1068722
protected function addPriceProductFacade(Container $container): Container
    {
        $container[static::FACADE_PRICE_PRODUCT] = function (Container $container) {
            return new PriceProductDataImportToPriceProductFacadeBridge($container->getLocator()->priceProduct()->facade());
        };

        return $container;
    }
927291
public function getContainer(): ?Container
    {
        if (!$this->hasContainer()) {
            $this->setContainer($this->getDefaultContainer());
        }
        return $this->container;
    }
818051
public function get(Container $container)
    {
        if ($this->singleton) {
            if ($this->instance === null) {
                $f = $this->factory;
                $this->instance = $f($container);
            }
            return $this->instance;
        } else {
            $f = $this->factory;
            return $f($container);
        }
    }