File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
app/code/Magento/Backend/Block Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,22 @@ protected function _prepareLayout()
31
31
32
32
$ this ->addChild ('sales ' , 'Magento\Backend\Block\Dashboard\Sales ' );
33
33
34
- if ($ this ->_scopeConfig ->getValue (self ::XML_PATH_ENABLE_CHARTS , \Magento \Store \Model \ScopeInterface::SCOPE_STORE )) {
34
+ $ isChartEnabled = $ this ->_scopeConfig ->getValue (
35
+ self ::XML_PATH_ENABLE_CHARTS ,
36
+ \Magento \Store \Model \ScopeInterface::SCOPE_STORE
37
+ );
38
+ if ($ isChartEnabled ) {
35
39
$ block = $ this ->getLayout ()->createBlock ('Magento\Backend\Block\Dashboard\Diagrams ' );
36
40
} else {
37
41
$ block = $ this ->getLayout ()->createBlock (
38
42
'Magento\Backend\Block\Template '
39
43
)->setTemplate (
40
44
'dashboard/graph/disabled.phtml '
41
45
)->setConfigUrl (
42
- $ this ->getUrl ('adminhtml/system_config/edit ' , ['section ' => 'admin ' ])
46
+ $ this ->getUrl (
47
+ 'adminhtml/system_config/edit ' ,
48
+ ['section ' => 'admin ' , '_fragment ' => 'admin_dashboard-link ' ]
49
+ )
43
50
);
44
51
}
45
52
$ this ->setChild ('diagrams ' , $ block );
You can’t perform that action at this time.
0 commit comments