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/wyomind/msicustomattributes/Controller/Adminhtml/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/wyomind/msicustomattributes/Controller/Adminhtml/CustomAttribute.php
<?php

/**
 * Copyright © 2019 Wyomind. All rights reserved.
 * See LICENSE.txt for license details.
 */

/**
 * Copyright © 2020 Wyomind. All rights reserved.
 * See LICENSE.txt for license details.
 */

/**
 * Copyright © 2020 Wyomind. All rights reserved.
 * See LICENSE.txt for license details.
 */

namespace Wyomind\MsiCustomAttributes\Controller\Adminhtml;

/**
 * Class Permissions
 * @package Wyomind\MsiCustomAttributes\Controller\Adminhtml
 */
abstract class CustomAttribute extends \Magento\Backend\App\Action
{


    public $dataPersistor;
    public $coreRegistry;
    public $cacheManager;
    /**
     *
     */
    const ADMIN_RESOURCE = 'Wyomind_MsiCustomAttributes::customattribute';

    /**
     * @var \Magento\Backend\App\Action\Context|null
     */
    protected $context = null;
    /**
     * @var \Magento\Framework\View\Result\PageFactory|null
     */
    protected $resultPageFactory = null;
    /**
     * @var null|\Wyomind\Framework\Helper\Module
     */
    protected $framework = null;

    /**
     * @var \Wyomind\MsiCustomAttributes\Model\CustomAttributeFactory
     */
    protected $customattributeModelFactory;

    /**
     * @var \Wyomind\MsiCustomAttributes\Model\CustomAttributeDropdownOptionFactory
     */
    protected $customAttributeDropdownOption;
    /**
     * @var \Wyomind\MsiCustomAttributes\Model\ResourceModel\CustomAttributeDropdownOptionFactory
     */
    protected $customAttributeDropdownOptionResource;
    /**
     * @var \Wyomind\MsiCustomAttributes\Model\CustomAttributeDropdownOptionValueFactory
     */
    protected $customAttributeDropdownOptionValue;
    /**
     * @var \Wyomind\MsiCustomAttributes\Model\ResourceModel\CustomAttributeDropdownOptionFactory
     */
    protected $customAttributeDropdownOptionValueResource;

    /**
     * Permissions constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\Model\Context $frameworkContext
     * @param \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     * @param \Wyomind\Framework\Helper\Module $framework
     * @param \Magento\Framework\Registry $coreRegistry
     * @param \Wyomind\MsiCustomAttributes\Model\CustomAttributeFactory $customattributeModelFactory
     * @param \Wyomind\MsiCustomAttributes\Model\CustomAttributeDropdownOptionFactory $customAttributeDropdownOption
     * @param \Wyomind\MsiCustomAttributes\Model\ResourceModel\CustomAttributeDropdownOptionFactory $customAttributeDropdownOptionResource
     * @param \Wyomind\MsiCustomAttributes\Model\CustomAttributeDropdownOptionValueFactory $customAttributeDropdownOptionValue
     * @param \Wyomind\MsiCustomAttributes\Model\ResourceModel\CustomAttributeDropdownOptionValueFactory $customAttributeDropdownOptionValueResource
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\Model\Context $frameworkContext,
        \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        \Wyomind\Framework\Helper\Module $framework,
        \Magento\Framework\Registry $coreRegistry,
        \Wyomind\MsiCustomAttributes\Model\CustomAttributeFactory $customattributeModelFactory,
        \Wyomind\MsiCustomAttributes\Model\CustomAttributeDropdownOptionFactory $customAttributeDropdownOption,
        \Wyomind\MsiCustomAttributes\Model\ResourceModel\CustomAttributeDropdownOptionFactory $customAttributeDropdownOptionResource,
        \Wyomind\MsiCustomAttributes\Model\CustomAttributeDropdownOptionValueFactory $customAttributeDropdownOptionValue,
        \Wyomind\MsiCustomAttributes\Model\ResourceModel\CustomAttributeDropdownOptionValueFactory $customAttributeDropdownOptionValueResource
    ) {
    
        $this->context = $context;
        $this->cacheManager = $frameworkContext->getCacheManager();
        $this->resultPageFactory = $resultPageFactory;
        $this->framework = $framework;
        $this->coreRegistry = $coreRegistry;
        $this->dataPersistor = $dataPersistor;

        $this->customattributeModelFactory = $customattributeModelFactory;

        $this->customAttributeDropdownOptionResource = $customAttributeDropdownOptionResource;
        $this->customAttributeDropdownOption = $customAttributeDropdownOption;

        $this->customAttributeDropdownOptionValueResource = $customAttributeDropdownOptionValueResource;
        $this->customAttributeDropdownOptionValue = $customAttributeDropdownOptionValue;

        parent::__construct($context);
    }

    /**
     * @return bool
     */
    protected function _isAllowed()
    {

        return $this->_authorization->isAllowed(self::ADMIN_RESOURCE);
    }

    /**
     * @param $title
     * @return $this
     */

    protected function _initAction($title)
    {
        $this->_view->loadLayout();
        $this->_setActiveMenu('Magento_InventoryAdminUi::stores');
        $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Custom Attributes > ') . $title);

        return $this;
    }

    /**
     * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface
     */
    abstract public function execute();
}

Spamworldpro Mini