Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-customer
Block
Account
RegisterLink.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Block\Account
;
7
8
use
Magento\Customer\Model\Context
;
9
17
class
RegisterLink
extends
\Magento\Framework\View\Element\Html\Link
18
{
24
protected
$httpContext
;
25
29
protected
$_registration
;
30
34
protected
$_customerUrl
;
35
43
public
function
__construct
(
44
\
Magento
\Framework\View\Element\
Template
\
Context
$context,
45
\
Magento
\Framework\
App
\Http\
Context
$httpContext
,
46
\
Magento
\
Customer
\Model\Registration $registration,
47
\
Magento
\
Customer
\Model\
Url
$customerUrl
,
48
array
$data
= []
49
) {
50
parent::__construct($context,
$data
);
51
$this->httpContext =
$httpContext
;
52
$this->_registration = $registration;
53
$this->_customerUrl =
$customerUrl
;
54
}
55
59
public
function
getHref
()
60
{
61
return
$this->_customerUrl->getRegisterUrl();
62
}
63
67
protected
function
_toHtml
()
68
{
69
if
(!$this->_registration->isAllowed()
70
|| $this->httpContext->getValue(
Context::CONTEXT_AUTH
)
71
) {
72
return
''
;
73
}
74
return
parent::_toHtml();
75
}
76
}
Magento\Customer\Block\Account\RegisterLink\_toHtml
_toHtml()
Definition:
RegisterLink.php:67
Magento\Customer\Model\Url
Definition:
Url.php:17
Magento\Framework\App
Magento\Customer\Block\Account\RegisterLink\$_customerUrl
$_customerUrl
Definition:
RegisterLink.php:34
Magento\Customer\Block\Account\RegisterLink\$_registration
$_registration
Definition:
RegisterLink.php:29
$customerUrl
$customerUrl
Definition:
info.phtml:28
Magento\Customer\Block\Account\Customer
Definition:
Customer.php:14
Magento\Framework\View\Element\Template\Context
Definition:
Context.php:23
Magento\Customer\Block\Account\RegisterLink\$httpContext
$httpContext
Definition:
RegisterLink.php:24
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Customer\Model\Context\CONTEXT_AUTH
const CONTEXT_AUTH
Definition:
Context.php:18
Magento\Customer\Block\Account\RegisterLink
Definition:
RegisterLink.php:17
Magento\Customer\Block\Account
Magento
Magento\Framework\View\Element\Html\Link
Definition:
Link.php:17
Magento\Framework\View\Element\Template
Definition:
Template.php:32
Magento\Customer\Model\Context
Definition:
Context.php:8
Magento\Customer\Block\Account\RegisterLink\getHref
getHref()
Definition:
RegisterLink.php:59
Magento\Customer\Block\Account\RegisterLink\__construct
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Customer\Model\Registration $registration, \Magento\Customer\Model\Url $customerUrl, array $data=[])
Definition:
RegisterLink.php:43