File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ class Config
117
117
'description ' => null ,
118
118
'keywords ' => null ,
119
119
'robots ' => null ,
120
+ 'title ' => null ,
120
121
];
121
122
122
123
/**
Original file line number Diff line number Diff line change @@ -136,6 +136,12 @@ public function renderMetadata()
136
136
protected function processMetadataContent ($ name , $ content )
137
137
{
138
138
$ method = 'get ' . $ this ->string ->upperCaseWords ($ name , '_ ' , '' );
139
+ if ($ name === 'title ' ) {
140
+ if (!$ content ) {
141
+ $ content = $ this ->escaper ->escapeHtml ($ this ->pageConfig ->$ method ()->get ());
142
+ }
143
+ return $ content ;
144
+ }
139
145
if (method_exists ($ this ->pageConfig , $ method )) {
140
146
$ content = $ this ->pageConfig ->$ method ();
141
147
}
Original file line number Diff line number Diff line change 13
13
use Magento \Framework \View \Page \Config ;
14
14
15
15
/**
16
- * @covers Magento\Framework\View\Page\Config
16
+ * @covers \ Magento\Framework\View\Page\Config
17
17
*
18
18
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
19
19
*/
@@ -139,6 +139,7 @@ public function testMetadata()
139
139
'description ' => null ,
140
140
'keywords ' => null ,
141
141
'robots ' => null ,
142
+ 'title ' => null ,
142
143
'name ' => 'test_value ' ,
143
144
'html_encoded ' => '<title><span class="test">Test</span></title> ' ,
144
145
];
You can’t perform that action at this time.
0 commit comments