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-backend
Model
View
Result
Page.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Backend\Model\View\Result
;
7
8
use
Magento\Framework\Translate
;
9
use
Magento\Framework\View
;
10
15
class
Page
extends
View\Result\Page
16
{
23
public
function
setActiveMenu($itemId)
24
{
26
$menuBlock = $this->layout->getBlock(
'menu'
);
27
$menuBlock->setActive($itemId);
28
$parents = $menuBlock->getMenuModel()->getParentItems($itemId);
29
foreach
($parents as
$item
) {
31
$this->getConfig()->getTitle()->prepend(
$item
->getTitle());
32
}
33
return
$this;
34
}
35
44
public
function
addBreadcrumb(
$label
,
$title
,
$link
=
null
)
45
{
47
$block
= $this->layout->getBlock(
'breadcrumbs'
);
48
if
(
$block
) {
49
$block
->addLink(
$label
,
$title
,
$link
);
50
}
51
return
$this;
52
}
53
60
public
function
addContent
(
View
\
Element
\AbstractBlock
$block
)
61
{
62
return
$this->
moveBlockToContainer
($block,
'content'
);
63
}
64
71
public
function
addLeft
(
View
\
Element
\AbstractBlock
$block
)
72
{
73
return
$this->
moveBlockToContainer
($block,
'left'
);
74
}
75
82
public
function
addJs
(
View
\
Element
\AbstractBlock
$block
)
83
{
84
return
$this->
moveBlockToContainer
($block,
'js'
);
85
}
86
96
protected
function
moveBlockToContainer
(
View
\
Element
\AbstractBlock
$block
, $containerName)
97
{
98
$this->layout->setChild($containerName,
$block
->getNameInLayout(),
''
);
99
return
$this;
100
}
101
}
$title
$title
Definition:
default.phtml:14
Magento\Backend\Model\View\Result\Page\addLeft
addLeft(View\Element\AbstractBlock $block)
Definition:
Page.php:71
Magento\Framework\View\Layout\Element
Definition:
Element.php:14
$item
$item
Definition:
partial_invoice.php:27
$block
$block
Definition:
block.php:8
Magento\Backend\Model\View\Result
Definition:
Forward.php:6
$link
$link
Definition:
quote_with_downloadable_product.php:27
Magento\Backend\Model\View\Result\Page\addJs
addJs(View\Element\AbstractBlock $block)
Definition:
Page.php:82
$label
$label
Definition:
details.phtml:21
Magento\Framework\Translate
Definition:
AbstractAdapter.php:10
Magento\Backend\Model\View\Result\Page\addContent
addContent(View\Element\AbstractBlock $block)
Definition:
Page.php:60
Magento\Framework\App\View
Definition:
View.php:8
Magento\Backend\Model\View\Result\Page\moveBlockToContainer
moveBlockToContainer(View\Element\AbstractBlock $block, $containerName)
Definition:
Page.php:96
Magento\Backend\Model\View\Result\Page
Definition:
Page.php:15
Magento\Framework\View