File tree 3 files changed +9
-1
lines changed
lib/internal/Magento/Framework/View 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
*/
@@ -137,6 +137,7 @@ public function testMetadata()
137
137
'description ' => null ,
138
138
'keywords ' => null ,
139
139
'robots ' => null ,
140
+ 'title ' => null ,
140
141
'name ' => 'test_value ' ,
141
142
'html_encoded ' => '<title><span class="test">Test</span></title> ' ,
142
143
];
You can’t perform that action at this time.
0 commit comments