| Current Path : /home/rtorresani/www/vendor/magento/module-send-friend/Block/Plugin/Catalog/Product/ |
| Current File : //home/rtorresani/www/vendor/magento/module-send-friend/Block/Plugin/Catalog/Product/View.php |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\SendFriend\Block\Plugin\Catalog\Product;
class View
{
/**
* @var \Magento\SendFriend\Model\SendFriend
*/
protected $_sendfriend;
/**
* @param \Magento\SendFriend\Model\SendFriend $sendfriend
*/
public function __construct(
\Magento\SendFriend\Model\SendFriend $sendfriend
) {
$this->_sendfriend = $sendfriend;
}
/**
* @param \Magento\Catalog\Block\Product\View $subject
* @param bool $result
* @return bool
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterCanEmailToFriend(\Magento\Catalog\Block\Product\View $subject, $result)
{
if (!$result) {
$result = $this->_sendfriend->canEmailToFriend();
}
return $result;
}
}