for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Copyright © 2021 O2TI. All rights reserved.
*
* @author Bruno Elisei <[email protected]>
* See LICENSE.txt for license details.
*/
namespace O2TI\ThemeFullCheckout\ConfigProvider;
use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Theme\Block\Html\Header\Logo;
use O2TI\ThemeFullCheckout\Helper\Config;
* Checkout Config Provider Full Checkout Compoments.
class CheckoutConfigProvider implements ConfigProviderInterface
{
* @var Config
private $config;
* @var Logo
private $logo;
* @param Logo $logo
* @param Config $config
public function __construct(
Logo $logo,
Config $config
) {
$this->logo = $logo;
$this->config = $config;
}
* Get Config to Checkout Config.
* @return array
public function getConfig(): array
return [
'theme_full_checkout_enable' => $this->config->isEnabled(),
'move_address_billing' => $this->config->isMoveAddressBilling(),
'logo_src' => $this->logo->getLogoSrc(),
'logo_width' => $this->logo->getLogoWidth(),
'logo_height' => $this->logo->getLogoHeight(),
'logo_alt' => $this->logo->getLogoAlt(),
];