ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
namespace Olegnax\LayeredNavigation\Model\Config\Source;
use Magento\Framework\Option\ArrayInterface;
class CategoryDepth implements ArrayInterface
{
public function toOptionArray()
{
return [
['value' => 0, 'label' => __('Don\'t show nested categories')],
['value' => 1, 'label' => __('1 level sub categories')],
['value' => 2, 'label' => __('2 level sub categories')],
['value' => 3, 'label' => __('3 level sub categories')],
['value' => 4, 'label' => __('4 level sub categories')],
['value' => 5, 'label' => __('5 level sub categories')],
];
}
public function toArray()
{
$array = [];
foreach ($this->toOptionArray() as $item) {
$array[$item['value']] = $item['label'];
}
return $array;
}
}
@@ -0,0 +1,33 @@
<?php
/**
* @author Olegnax
* @package Olegnax_LayeredNavigation
* @copyright Copyright (c) 2019 Olegnax (http://olegnax.com/). All rights reserved.
* @license Proprietary License https://olegnax.com/license/
*/
namespace Olegnax\LayeredNavigation\Model\Config\Source;
use Magento\Framework\Option\ArrayInterface;
class FiltersType implements ArrayInterface
{
const TYPE_CHECKBOX = 'checkbox';
public function toOptionArray()
{
return [
['value' => '', 'label' => __('Simple Links')],
['value' => static::TYPE_CHECKBOX, 'label' => __('Checkboxes')],
];
}
public function toArray()
{
$array = [];
foreach ($this->toOptionArray() as $item) {
$array[$item['value']] = $item['label'];
}
return $array;
}
}
@@ -0,0 +1,41 @@
<?php
/**
* @author Olegnax
* @package Olegnax_LayeredNavigation
* @copyright Copyright (c) 2019 Olegnax (http://olegnax.com/). All rights reserved.
* @license Proprietary License https://olegnax.com/license/
*/
namespace Olegnax\LayeredNavigation\Model\Config\Source;
use Magento\Framework\Option\ArrayInterface;
class LoaderType implements ArrayInterface
{
const TYPE_THEME = 'theme';
const TYPE_MAGENTO = 'magento';
const TYPE_BLOCK = 'css';
const TYPE_IMAGE = 'image';
public function toOptionArray()
{
return [
['value' => '', 'label' => __('Disabled')],
['value' => static::TYPE_MAGENTO, 'label' => __('Magento Default')],
['value' => static::TYPE_BLOCK, 'label' => __('CSS Preloader')],
['value' => static::TYPE_THEME, 'label' => __('Theme Preloader')],
['value' => static::TYPE_IMAGE, 'label' => __('Custom Image')]
];
}
public function toArray()
{
return [
'' => __('Disabled'),
static::TYPE_MAGENTO => __('Magento Default'),
static::TYPE_IMAGE => __('CSS Preloader'),
static::TYPE_THEME => __('Theme Preloader'),
static::TYPE_IMAGE => __('Custom Image')
];
}
}
@@ -0,0 +1,20 @@
<?php
/**
* @author Olegnax
* @package Olegnax_LayeredNavigation
* @copyright Copyright (c) 2019 Olegnax (http://olegnax.com/). All rights reserved.
* @license Proprietary License https://olegnax.com/license/
*/
namespace Olegnax\LayeredNavigation\Model\Config\Source;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
class Spacer extends Field
{
protected function _decorateRowHtml(AbstractElement $element, $html)
{
return '<tr id="row_' . $element->getHtmlId() . '"><td></td><td colspan="2"><hr class="ox-settings-spacer"></td></tr>';
}
}