This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,91 @@
<?php
namespace WeltPixel\LayeredNavigation\Block\Adminhtml\Product\Attribute\Edit\Tab;
use Magento\Backend\Block\Template\Context;
use Magento\Backend\Block\Widget\Form\Generic;
use Magento\Catalog\Model\Entity\Attribute;
use Magento\Framework\Data\FormFactory;
use Magento\Framework\Registry;
/**
* @api
* @since 100.0.2
*/
class Options extends Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface
{
/**
* @param Context $context
* @param Registry $registry
* @param FormFactory $formFactory
* @param array $data
*/
public function __construct(
Context $context,
Registry $registry,
FormFactory $formFactory,
array $data = []
) {
parent::__construct($context, $registry, $formFactory, $data);
}
/**
* Return Tab label
*
* @return string
* @api
*/
public function getTabLabel() {
return __('WeltPixel Layered Navigation Properties');
}
/**
* Return Tab title
*
* @return string
* @api
*/
public function getTabTitle() {
return __('WeltPixel Layered Navigation Properties');
}
/**
* Can show tab in tabs
*
* @return boolean
* @api
*/
public function canShowTab() {
return true;
}
/**
* Tab is hidden
*
* @return boolean
* @api
*/
public function isHidden() {
return false;
}
/**
* {@inheritdoc}
* @return $this
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
protected function _prepareForm()
{
/** @var Attribute $attributeObject */
$attributeObject = $this->_coreRegistry->registry('entity_attribute');
/** @var \Magento\Framework\Data\Form $form */
$form = $this->_formFactory->create(
['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]
);
$this->_eventManager->dispatch('product_attribute_form_build_weltpixel_layerednavigation_tab', ['form' => $form]);
$this->setForm($form);
$form->setValues($attributeObject->getData());
return parent::_prepareForm();
}
}
@@ -0,0 +1,30 @@
<?php
namespace WeltPixel\LayeredNavigation\Block\Adminhtml\System\Config;
/**
* Implement
* @category WeltPixel_OwlCarouselSlider
* @package WeltPixel_OwlCarouselSlider
* @module OwlCarouselSlider
* @author WeltPixel_OwlCarouselSlider Developer
*/
class InfoMessage extends \Magento\Config\Block\System\Config\Form\Field
{
protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
$number = (int)substr($element->getId(), -1);
$html = '
<div class="message" style="text-align: center; margin-top: 20px;">
<p>' . __('For more settings on attribute level, go to
<strong>Stores -> Attributes -> Product -> [select desired attribute from grid] ->
Storefront Properties -> WeltPixel Layered Navigation Properties</strong>
section.') . '</p>
</div>
';
return $html;
}
}