Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/aheadworks/module-csblock/Model/Source/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/aheadworks/module-csblock/Model/Source/Position.php
<?php
namespace Aheadworks\Csblock\Model\Source;

use Magento\Framework\Data\OptionSourceInterface;

/**
 * Class Position
 * @package Aheadworks\Csblock\Model\Source
 */
class Position implements OptionSourceInterface
{

    /**
     * constants are defined for custom sorting. ASC sorting:
     * MENU TOP/BOTTOM
     * CONTENT TOP/BOTTOM
     * SIDEBAR TOP/BOTTOM
     */

    const SIDEBAR_TOP = 5;
    const SIDEBAR_BOTTOM = 6;
    const CONTENT_TOP = 3;
    const PAGE_BOTTOM = 4;
    const MENU_TOP = 1;
    const MENU_BOTTOM = 2;

    const SIDEBAR_TOP_LABEL = "Sidebar top";
    const SIDEBAR_BOTTOM_LABEL = "Sidebar bottom";
    const CONTENT_TOP_LABEL = "Content top";
    const PAGE_BOTTOM_LABEL = "Page bottom";
    const MENU_TOP_LABEL = "Menu Top";
    const MENU_BOTTOM_LABEL = "Menu Bottom";

    const DEFAULT_VALUE = 3;

    public function getOptionArray()
    {
        return $this->getTranslatedOptionArray();
    }

    public function toOptionArray()
    {
        $optionsArray = [];
        $options = $this->getTranslatedOptionArray();

        foreach ($options as $key => $value) {
            $optionsArray[] = ['value' => $key, 'label' => $value];
        }
        return $optionsArray;
    }

    public function getTranslatedOptionArray()
    {
        $translatedOptions = [];
        $untranslatedOptions = $this->getUntranslatedOptionArray();

        foreach ($untranslatedOptions as $key => $value) {
            $translatedOptions[$key] = __($value);
        }
        return $translatedOptions;
    }

    public function getUntranslatedOptionArray()
    {
        return [
            self::SIDEBAR_TOP => self::SIDEBAR_TOP_LABEL,
            self::SIDEBAR_BOTTOM => self::SIDEBAR_BOTTOM_LABEL,
            self::CONTENT_TOP => self::CONTENT_TOP_LABEL,
            self::PAGE_BOTTOM => self::PAGE_BOTTOM_LABEL,
            self::MENU_TOP => self::MENU_TOP_LABEL,
            self::MENU_BOTTOM => self::MENU_BOTTOM_LABEL
        ];
    }
}

Spamworldpro Mini