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,49 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class BackgroundColor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class BackgroundColor extends OptionArray
{
const CUSTOM = 'Custom';
const NONE = 'transparent';
const WHITE = '#FFFFFF';
const GRAY = '#808080';
const BLACK = '#000000';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::CUSTOM => __('Custom'),
self::WHITE => __('White'),
self::NONE => __('None'),
self::GRAY => __('Gray'),
self::BLACK => __('Black'),
];
}
}
@@ -0,0 +1,49 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class ButtonColor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class ButtonColor extends OptionArray
{
const CUSTOM = 'Custom';
const WHITE = '#FFFFFF';
const ORIGINAL = 'unset';
const GRAY = '#808080';
const BLACK = '#000000';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::ORIGINAL => __('Default'),
self::WHITE => __('White'),
self::BLACK => __('Black'),
self::GRAY => __('Gray'),
self::CUSTOM => __('Custom'),
];
}
}
@@ -0,0 +1,45 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class ButtonSize
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class ButtonSize extends OptionArray
{
const SMALL = '16x16';
const MEDIUM = '32x32';
const LARGE = '64x64';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::SMALL => __('16x16'),
self::MEDIUM => __('32x32'),
self::LARGE => __('64x64'),
];
}
}
@@ -0,0 +1,43 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class DisplayMenu
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class DisplayMenu extends OptionArray
{
const ON_HOVER = 'hover';
const ON_CLICK = 'click';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::ON_HOVER => __('Hover'),
self::ON_CLICK => __('Click'),
];
}
}
@@ -0,0 +1,43 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class FloatApplyFor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatApplyFor extends OptionArray
{
const ALL_PAGES = 'all_pages';
const SELECT_PAGES = 'select_pages';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::ALL_PAGES => __('All Pages'),
self::SELECT_PAGES => __('Select Pages')
];
}
}
@@ -0,0 +1,63 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
use Magento\Cms\Model\PageFactory;
/**
* Class FloatCmsPages
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatCmsPages extends OptionArray
{
/**
* @var PageFactory
*/
protected $_pageFactory;
/**
* FloatCmsPages constructor.
*
* @param PageFactory $pageFactory
*/
public function __construct(PageFactory $pageFactory)
{
$this->_pageFactory = $pageFactory;
}
/**
* @return array
*/
public function getOptionHash()
{
$pages = $this->_pageFactory->create()->getCollection();
$cmsPages = [];
foreach ($pages as $page) {
if ($page->isActive()){
$cmsPages[$page->getId()] = $page->getTitle();
}
}
return $cmsPages;
}
}
@@ -0,0 +1,43 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class FloatPosition
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatPosition extends OptionArray
{
const LEFT = 'left';
const RIGHT = 'right';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::LEFT => __('Left'),
self::RIGHT => __('Right'),
];
}
}
@@ -0,0 +1,45 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class FloatSelectPages
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatSelectPages extends OptionArray
{
const CATEGORY_PAGE = 'category_page';
const PRODUCT_PAGE = 'product_page';
const CONTACT_US = 'contact_us';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::PRODUCT_PAGE => __('Products Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::CONTACT_US => __('Contact Us')
];
}
}
@@ -0,0 +1,47 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class IconColor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class IconColor extends OptionArray
{
const CUSTOM = 'Custom';
const WHITE = '#FFFFFF';
const GRAY = '#808080';
const BLACK = '#000000';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::CUSTOM => __('Custom'),
self::WHITE => __('White'),
self::GRAY => __('Gray'),
self::BLACK => __('Black'),
];
}
}
@@ -0,0 +1,74 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
use Mageplaza\SocialShare\Helper\Data as HelperData;
/**
* Class InlineApplyFor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class InlineApplyFor extends OptionArray
{
const HOME_PAGE = 'home_page';
const CATEGORY_PAGE = 'category_page';
const PRODUCT_PAGE = 'product_page';
const DAILYDEAL_ALLDEALS = 'dailydeal_alldeals';
const DAILYDEAL_BESTSELLERDEALS = 'dailydeal_bestsellerdeals';
const DAILYDEAL_FEATUREDDEALS = 'dailydeal_featureddeals';
const DAILYDEAL_NEWDEALS = 'dailydeal_newdeals';
/**
* @var HelperData
*/
protected $_helperData;
public function __construct(HelperData $helperData)
{
$this->_helperData = $helperData;
}
/**
* @return array
*/
public function getOptionHash()
{
if (!$this->_helperData->checkDailyDealEnable()) {
$pages = [
self::HOME_PAGE => __('Home Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::PRODUCT_PAGE => __('Products Page')
];
} else {
$pages = [
self::HOME_PAGE => __('Home Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::PRODUCT_PAGE => __('Products Page'),
self::DAILYDEAL_ALLDEALS => __('Daily Deal All Deals Page'),
self::DAILYDEAL_BESTSELLERDEALS => __('Daily Deal Bestseller Deals Page'),
self::DAILYDEAL_FEATUREDDEALS => __('Daily Deal Featured Deals Page'),
self::DAILYDEAL_NEWDEALS => __('Daily Deal New Deals Page'),
];
}
return $pages;
}
}
@@ -0,0 +1,43 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class InlinePosition
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class InlinePosition extends OptionArray
{
const TOP_CONTENT = 'top_content';
const BOTTOM_CONTENT = 'bottom_content';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::TOP_CONTENT => __('Top Content'),
self::BOTTOM_CONTENT => __('Bottom Content'),
];
}
}
@@ -0,0 +1,54 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
use Magento\Framework\Option\ArrayInterface;
/**
* Class OptionArray
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
abstract class OptionArray implements ArrayInterface
{
/**
* Return array of options as value-label pairs
*
* @return array Format: array(array('value' => '<value>', 'label' => '<label>'), ...)
*/
public function toOptionArray()
{
$options = [];
foreach ($this->getOptionHash() as $value => $label) {
$options[] = [
'value' => $value,
'label' => $label
];
}
return $options;
}
/**
* @return array
*/
abstract public function getOptionHash();
}
@@ -0,0 +1,43 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class Style
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class Style extends OptionArray
{
const HORIZONTAL = 'horizontal';
const VERTICAL = 'vertical';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::HORIZONTAL => __('Horizontal'),
self::VERTICAL => __('Vertical'),
];
}
}