This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace WeltPixel\Backend\Block\Adminhtml;
/**
* Class Debugger
* @package WeltPixel\Backend\Block\Adminhtml
*/
class Debugger extends \Magento\Backend\Block\Widget\Grid\Container
{
protected function _construct()
{
$this->_controller = 'weltpixelbackend_debugger';
$this->_blockGroup = 'WeltPixel_Backend';
parent::_construct();
$this->removeButton('add');
$this->addButton(
'only-custom',
[
'label' => __("Only Custom Modules"),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/rewritescustom') . '\')',
'class' => 'primary'
]
);
$this->addButton(
'all-core',
[
'label' => __("All Magento Modules"),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/rewritesall') . '\')',
'class' => 'secondary'
]
);
}
}
@@ -0,0 +1,28 @@
<?php
namespace WeltPixel\Backend\Block\Adminhtml\Grid\Renderer;
/**
* Class RewriteStatus
* @package WeltPixel\Backend\Block\Adminhtml\Grid\Renderer
*/
class RewriteStatus extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
* Prepare link to display in grid
*
* @param \Magento\Framework\DataObject $row
* @return string
*/
public function render(\Magento\Framework\DataObject $row)
{
$statusClass = 'ok';
$statusMessage = __('OK');
if (!$row->getStatus()) {
$statusClass = 'nok';
$statusMessage = __('CHECK REWRITE');
}
return '<span class="rewrite-status rewrite-status-'.$statusClass.'">' . $statusMessage .'</span>';
}
}
@@ -0,0 +1,15 @@
<?php
namespace WeltPixel\Backend\Block\Adminhtml\System\Config;
/**
* Class Extensions
* @package WeltPixel\Backend\Block\Adminhtml\System\Config
*/
class Extensions extends \Magento\Config\Block\System\Config\Form\Fieldset
{
public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
return '<iframe id="weltpixel_store" width="100%" src="https://www.weltpixel.com/store/index.html?id=' . uniqid() .'" ></iframe>';
}
}
@@ -0,0 +1,25 @@
<?php
/**
* @category WeltPixel
* @package WeltPixel_Backend
* @copyright Copyright (c) 2018 Weltpixel
* @author Weltpixel TEAM
*/
namespace WeltPixel\Backend\Block\Adminhtml\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
/**
* Class Disable
* @package WeltPixel\Backend\Block\System\Config\Form\Field
*/
class Disable extends \Magento\Config\Block\System\Config\Form\Field
{
protected function _getElementHtml(AbstractElement $element)
{
$element->setDisabled('disabled');
return $element->getElementHtml();
}
}
@@ -0,0 +1,24 @@
<?php
/**
* @category WeltPixel
* @package WeltPixel_Backend
* @copyright Copyright (c) 2018 Weltpixel
* @author Weltpixel TEAM
*/
namespace WeltPixel\Backend\Block\Adminhtml\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
/**
* Class EmptyField
* @package WeltPixel\Backend\Block\System\Config\Form\Field
*/
class EmptyField extends \Magento\Config\Block\System\Config\Form\Field
{
protected function _getElementHtml(AbstractElement $element)
{
return '';
}
}
@@ -0,0 +1,23 @@
<?php
namespace WeltPixel\Backend\Block\Adminhtml\System\Config;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
/**
* Class Notification
* @package WeltPixel\Backend\Block\Adminhtml\System\Config
*/
class Notification extends Field
{
protected $_template = 'WeltPixel_Backend::system/config/notification.phtml';
/**
* @param AbstractElement $element
* @return string
*/
protected function _getElementHtml(AbstractElement $element)
{
return $this->_toHtml();
}
}
@@ -0,0 +1,37 @@
<?php
namespace WeltPixel\Backend\Block\Adminhtml\System\Config;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
/**
* Class SystemInformation
* @package WeltPixel\Backend\Block\Adminhtml\System\Config
*/
class SystemInformation extends Field
{
protected $_template = 'WeltPixel_Backend::system/config/information.phtml';
/**
* @param AbstractElement $element
* @return string
*/
protected function _getElementHtml(AbstractElement $element)
{
return $this->_toHtml();
}
/**
* @return string
*/
public function getMagentoMode() {
return $this->_appState->getMode();
}
/**
* @return string
*/
public function getMagentoPath() {
return $this->getRootDirectory()->getAbsolutePath();
}
}