ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Alignhorizontal extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('item-left'), 'value' => 'item-left'],
|
||||
['label' => __('item-right'), 'value' => 'item-right'],
|
||||
['label' => __('item-center'), 'value' => 'item-center'],
|
||||
['label' => __('menu-left'), 'value' => 'menu-left'],
|
||||
['label' => __('menu-right'), 'value' => 'menu-right'],
|
||||
['label' => __('menu-center'), 'value' => 'menu-center'],
|
||||
['label' => __('window-left'), 'value' => 'window-left'],
|
||||
['label' => __('window-right'), 'value' => 'window-right'],
|
||||
['label' => __('window-center'), 'value' => 'window-center'],
|
||||
['label' => __('container-left'), 'value' => 'container-left'],
|
||||
['label' => __('container-right'), 'value' => 'container-right'],
|
||||
['label' => __('container-center'), 'value' => 'container-center'],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Alignvertical extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('menu bottom'), 'value' => 'menu-bottom'],
|
||||
['label' => __('container bottom'), 'value' => 'container-bottom'],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Animation extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('toggle'), 'value' => 'toggle'],
|
||||
['label' => __('fade'), 'value' => 'fade'],
|
||||
['label' => __('emersion'), 'value' => 'emersion'],
|
||||
['label' => __('emersion vertical'), 'value' => 'emersion-vertical'],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Columns extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('1'), 'value' => 1],
|
||||
['label' => __('2'), 'value' => 2],
|
||||
['label' => __('3'), 'value' => 3],
|
||||
['label' => __('4'), 'value' => 4],
|
||||
['label' => __('5'), 'value' => 5],
|
||||
['label' => __('6'), 'value' => 6],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Columnsgrid extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('Full Width'), 'value' => 12],
|
||||
['label' => __('One Half'), 'value' => 6],
|
||||
['label' => __('One Third'), 'value' => 4],
|
||||
['label' => __('One Fourth'), 'value' => 3],
|
||||
['label' => __('One Sixth'), 'value' => 2]
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Duration extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('toggle'), 'value' => 'toggle'],
|
||||
['label' => __('fade'), 'value' => 'fade'],
|
||||
['label' => __('emersion'), 'value' => 'emersion'],
|
||||
['label' => __('emersion vertical'), 'value' => 'emersion-vertical'],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Layout extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('Top / Left, Categories, Right / Bottom'), 'value' => 1],
|
||||
['label' => __('Left / Top, Categories, Bottom / Right'), 'value' => 2],
|
||||
['label' => __('Left / Top, Categories / Right / Bottom'), 'value' => 3],
|
||||
['label' => __('Left / Top / Categories, Bottom / Right'), 'value' => 4],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class Menuwidth extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('Default'), 'value' => 'default'],
|
||||
['label' => __('Custom Width'), 'value' => 'custom'],
|
||||
['label' => __('Column Max Width'), 'value' => 'column-max-width'],
|
||||
['label' => __('Container Width'), 'value' => 'container'],
|
||||
['label' => __('Full website Width'), 'value' => 'fullwidth']
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php /**/
|
||||
|
||||
namespace Olegnax\MegaMenu\Model\Attribute;
|
||||
|
||||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
|
||||
|
||||
class MmLvl2AlignVertical extends AbstractSource
|
||||
{
|
||||
/**
|
||||
* Retrieve option array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionArray()
|
||||
{
|
||||
$_options = [];
|
||||
foreach ($this->getAllOptions() as $option) {
|
||||
$_options[$option['value']] = $option['label'];
|
||||
}
|
||||
return $_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all options array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllOptions()
|
||||
{
|
||||
if ($this->_options === null) {
|
||||
$this->_options = [
|
||||
['label' => __('Default, Overlap Parent Drop'), 'value' => ''],
|
||||
['label' => __('Right, Relative to Link'), 'value' => 'right'],
|
||||
['label' => __('Parent Drop Top, without stretch'), 'value' => 'top'],
|
||||
['label' => __('Parent Drop Top, with Height Stretch'), 'value' => 'top-stretch'],
|
||||
];
|
||||
}
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a text for option value
|
||||
*
|
||||
* @param string|int $value
|
||||
* @return string|false
|
||||
*/
|
||||
public function getOptionText($value)
|
||||
{
|
||||
$options = $this->getAllOptions();
|
||||
foreach ($options as $option) {
|
||||
if ($option['value'] == $value) {
|
||||
return $option['label'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user