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
Block
Dashboard
Grids.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Backend\Block\Dashboard
;
7
13
class
Grids
extends
\Magento\Backend\Block\Widget\Tabs
14
{
18
protected
$_template
=
'Magento_Backend::widget/tabshoriz.phtml'
;
19
23
protected
function
_construct
()
24
{
25
parent::_construct();
26
$this->setId(
'grid_tab'
);
27
$this->
setDestElementId
(
'grid_tab_content'
);
28
}
29
44
protected
function
_prepareLayout
()
45
{
46
// load this active tab statically
47
$this->
addTab
(
48
'ordered_products'
,
49
[
50
'label'
=>
__
(
'Bestsellers'
),
51
'content'
=> $this->
getLayout
()->createBlock(
52
\
Magento
\Backend\Block\
Dashboard
\Tab\Products\Ordered::class
53
)->
toHtml
(),
54
'active'
=>
true
55
]
56
);
57
58
// load other tabs with ajax
59
$this->
addTab
(
60
'reviewed_products'
,
61
[
62
'label'
=>
__
(
'Most Viewed Products'
),
63
'url'
=> $this->
getUrl
(
'adminhtml/*/productsViewed'
, [
'_current'
=>
true
]),
64
'class'
=>
'ajax'
65
]
66
);
67
68
$this->
addTab
(
69
'new_customers'
,
70
[
71
'label'
=>
__
(
'New Customers'
),
72
'url'
=> $this->
getUrl
(
'adminhtml/*/customersNewest'
, [
'_current'
=>
true
]),
73
'class'
=>
'ajax'
74
]
75
);
76
77
$this->
addTab
(
78
'customers'
,
79
[
80
'label'
=>
__
(
'Customers'
),
81
'url'
=> $this->
getUrl
(
'adminhtml/*/customersMost'
, [
'_current'
=>
true
]),
82
'class'
=>
'ajax'
83
]
84
);
85
86
return
parent::_prepareLayout();
87
}
88
}
Magento\Backend\Block\Dashboard\Grids\_construct
_construct()
Definition:
Grids.php:23
Magento\Framework\View\Element\BlockInterface\toHtml
toHtml()
Magento\Backend\Block\Dashboard
Definition:
GraphTest.php:6
__
__()
Definition:
__.php:13
Magento\Backend\Block\Dashboard\Grids\$_template
$_template
Definition:
Grids.php:18
Magento\Backend\Block\Widget\Tabs\addTab
addTab($tabId, $tab)
Definition:
Tabs.php:115
Magento\Framework\View\Element\AbstractBlock\getUrl
getUrl($route='', $params=[])
Definition:
AbstractBlock.php:773
Magento\Backend\Block\Widget\Tabs\setDestElementId
setDestElementId($elementId)
Definition:
Tabs.php:86
Magento\Framework\View\Element\AbstractBlock\getLayout
getLayout()
Definition:
AbstractBlock.php:295
Magento\Backend\Block\Dashboard\Grids\_prepareLayout
_prepareLayout()
Definition:
Grids.php:44
Magento
Magento\Backend\Block\Dashboard
Definition:
Dashboard.php:13
Magento\Backend\Block\Dashboard\Grids
Definition:
Grids.php:13