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-sales
Block
Reorder
Sidebar.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Sales\Block\Reorder
;
7
8
use
Magento\Customer\Model\Context
;
9
16
class
Sidebar
extends
\Magento\Framework\View\Element\Template
17
{
21
protected
$httpContext
;
22
28
public
function
__construct
(
29
\
Magento
\Framework\View\Element\Template\
Context
$context,
30
\
Magento
\Framework\
App
\Http\
Context
$httpContext
,
31
array
$data
= []
32
) {
33
parent::__construct($context,
$data
);
34
$this->httpContext =
$httpContext
;
35
}
36
43
public
function
getFormActionUrl
()
44
{
45
return
$this->
getUrl
(
'checkout/cart/addgroup'
, [
'_secure'
=>
true
]);
46
}
47
53
protected
function
_toHtml
()
54
{
55
$isValid = $this->httpContext->getValue(
Context::CONTEXT_AUTH
) || $this->getCustomerId();
56
return
$isValid ? parent::_toHtml() :
''
;
57
}
58
}
Magento\Framework\App
Magento\Sales\Block\Reorder\Sidebar
Definition:
Sidebar.php:16
Magento\Sales\Block\Reorder\Sidebar\_toHtml
_toHtml()
Definition:
Sidebar.php:53
Magento\Sales\Block\Reorder\Sidebar\$httpContext
$httpContext
Definition:
Sidebar.php:21
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Sales\Block\Reorder\Sidebar\__construct
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, array $data=[])
Definition:
Sidebar.php:28
Magento\Framework\View\Element\AbstractBlock\getUrl
getUrl($route='', $params=[])
Definition:
AbstractBlock.php:773
Magento\Customer\Model\Context\CONTEXT_AUTH
const CONTEXT_AUTH
Definition:
Context.php:18
Magento\Sales\Block\Reorder
Definition:
Sidebar.php:6
Magento
Magento\Sales\Block\Reorder\Sidebar\getFormActionUrl
getFormActionUrl()
Definition:
Sidebar.php:43
Magento\Framework\View\Element\Template
Definition:
Template.php:32
Magento\Customer\Model\Context
Definition:
Context.php:8