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/extmag/core/Model/System/Message/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/extmag/core/Model/System/Message/DMSystemMessage.php
<?php
/**
 * Copyright © Extmag. All rights reserved.
 */

namespace Extmag\Core\Model\System\Message;

use Extmag\Core\Model\ConfigFactory;
use Extmag\Core\Model\ConfigRepository;
use Extmag\Core\Model\ResourceModel\Config\CollectionFactory;
use Magento\Framework\Notification\MessageInterface;

class DMSystemMessage implements MessageInterface
{
    const MESS_IDENTITY = 'extmag_dm_system_message';

    /**
     * @var CollectionFactory
     */
    protected $collection;
    /**
     * @var ConfigFactory
     */
    protected $config;
    /**
     * @var ConfigRepository
     */
    protected $configRepository;

    private $isDisplayed = false;
    private $textMess = '';

    /**
     * @param CollectionFactory $collection
     * @param ConfigFactory $config
     * @param ConfigRepository $configRepository
     */
    public function __construct(
        CollectionFactory $collection,
        ConfigFactory $config,
        ConfigRepository $configRepository
    ) {
        $this->collection = $collection;
        $this->config = $config;
        $this->configRepository = $configRepository;

        $collection = $this->collection->create();
        $collection->clear();
        $collection->addFieldToFilter('path', 'dm/expired/message');
        foreach ($collection as $item) {
            $this->textMess = $item->getValue();
            $this->isDisplayed = true;
            break;
        }
    }

    public function getIdentity()
    {
        return self::MESS_IDENTITY;
    }

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

    public function getText()
    {
        return $this->textMess;
    }

    public function getSeverity()
    {
        return self::SEVERITY_MAJOR;
    }
}

Spamworldpro Mini