init
This commit is contained in:
+85
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* Mageplaza
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Mageplaza.com license that is
|
||||
* available through the world-wide-web at this URL:
|
||||
* https://www.mageplaza.com/LICENSE.txt
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this extension to newer
|
||||
* version in the future.
|
||||
*
|
||||
* @category Mageplaza
|
||||
* @package Mageplaza_Blog
|
||||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
|
||||
* @license https://www.mageplaza.com/LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace Mageplaza\Blog\Block\Html;
|
||||
|
||||
use Magento\Framework\View\Element\Html\Link;
|
||||
use Magento\Framework\View\Element\Template\Context;
|
||||
use Mageplaza\Blog\Helper\Data;
|
||||
|
||||
/**
|
||||
* Class Footer
|
||||
* @package Mageplaza\Blog\Block\Html
|
||||
*/
|
||||
class Footer extends Link
|
||||
{
|
||||
/**
|
||||
* @var Data
|
||||
*/
|
||||
public $helper;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_template = 'Mageplaza_Blog::html\footer.phtml';
|
||||
|
||||
/**
|
||||
* Footer constructor.
|
||||
*
|
||||
* @param Context $context
|
||||
* @param Data $helper
|
||||
* @param array $data
|
||||
*/
|
||||
public function __construct(
|
||||
Context $context,
|
||||
Data $helper,
|
||||
array $data = []
|
||||
) {
|
||||
$this->helper = $helper;
|
||||
|
||||
parent::__construct($context, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHref()
|
||||
{
|
||||
return $this->helper->getBlogUrl('');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Magento\Framework\Phrase|mixed|string
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->helper->getBlogConfig('display/name', $this->helper->getCurrentStoreId()) ? : __('Blog');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Data
|
||||
*/
|
||||
public function getHelperData()
|
||||
{
|
||||
return $this->helper;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user