b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / dev2.destoffenstraat.com / app / code / Swissup / Firecheckout / Block / Html / Head /
Filename/home/dev2.destoffenstraat.com/app/code/Swissup/Firecheckout/Block/Html/Head/Xrayquire.php
Size1.74 kb
Permissionrwxrwxrwx
Ownerroot : root
Create time17-Aug-2025 10:26
Last modified06-Jun-2022 12:57
Last accessed22-Aug-2025 11:08
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php

namespace Swissup\Firecheckout\Block\Html\Head;

/**
* Block responsible for including xrayquire on the page
*/
class Xrayquire extends \Magento\Framework\View\Element\AbstractBlock
{
const XRAYQUIRE_PATH = 'Swissup_Firecheckout::js/lib/xrayquire.js';

const XRAYQUIRE_MAGENTO_PATH = 'Swissup_Firecheckout::js/lib/xrayquire-magento.js';

/**
* @var \Magento\Framework\View\Page\Config
*/
private $pageConfig;

/**
* @param \Magento\Framework\View\Element\Context $context
* @param \Magento\Framework\View\Page\Config $pageConfig
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Context $context,
\Magento\Framework\View\Page\Config $pageConfig,
array $data = []
) {
parent::__construct($context, $data);
$this->pageConfig = $pageConfig;
}

/**
* Include RequireJs configuration as an asset on the page
*
* @return $this
*/
protected function _prepareLayout()
{
if (!$this->getRequest()->getParam('xrayquire')) {
return;
}

$after = \Magento\Framework\RequireJs\Config::REQUIRE_JS_FILE_NAME;
$assetCollection = $this->pageConfig->getAssetCollection();

$xrayquire = $this->_assetRepo->createAsset(self::XRAYQUIRE_PATH);
$assetCollection->insert(
$xrayquire->getFilePath(),
$xrayquire,
$after
);

$xrayquireMagento = $this->_assetRepo->createAsset(self::XRAYQUIRE_MAGENTO_PATH);
$assetCollection->insert(
$xrayquireMagento->getFilePath(),
$xrayquireMagento,
$xrayquire->getFilePath()
);

return parent::_prepareLayout();
}
}