File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/internal/Magento/Framework/View/Page/Config/Generator Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Framework \View \Layout ;
9
9
use Magento \Framework \View \Page \Config \Structure ;
10
+ use Magento \Framework \App \ObjectManager ;
10
11
11
12
class Head implements Layout \GeneratorInterface
12
13
{
@@ -60,20 +61,20 @@ class Head implements Layout\GeneratorInterface
60
61
/**
61
62
* @var \Magento\Framework\UrlInterface
62
63
*/
63
- protected $ url ;
64
+ private $ url ;
64
65
65
66
/**
66
67
* Constructor
67
68
*
68
69
* @param \Magento\Framework\View\Page\Config $pageConfig
69
- * @param \Magento\Framework\UrlInterface $url
70
+ * @param \Magento\Framework\UrlInterface|null $url
70
71
*/
71
72
public function __construct (
72
73
\Magento \Framework \View \Page \Config $ pageConfig ,
73
- \Magento \Framework \UrlInterface $ url
74
+ \Magento \Framework \UrlInterface $ url = null
74
75
) {
75
76
$ this ->pageConfig = $ pageConfig ;
76
- $ this ->url = $ url ;
77
+ $ this ->url = $ url ?: ObjectManager:: getInstance ()-> get (\ Magento \ Framework \UrlInterface::class) ;
77
78
}
78
79
79
80
/**
You can’t perform that action at this time.
0 commit comments