Skip to content

Commit 8e5dd9f

Browse files
author
Hwashiang Yu
committed
MC-5810: Improve naming of the critical variables/parameters in the code and configuration
- Renamed render_template to master_template in php files - Renamed is_visible to is_system in php files
1 parent 53b71dc commit 8e5dd9f

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

app/code/Magento/PageBuilder/Model/Config/ContentType/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private function convertAppearanceData(\DOMElement $appearanceNode): array
133133
}
134134
$appearanceData['converters'] = $this->convertConvertersData($appearanceNode);
135135
$appearanceData['preview_template'] = $this->getAttributeValue($appearanceNode, 'preview_template');
136-
$appearanceData['render_template'] = $this->getAttributeValue($appearanceNode, 'render_template');
136+
$appearanceData['master_template'] = $this->getAttributeValue($appearanceNode, 'master_template');
137137
$appearanceData['reader'] = $this->getAttributeValue($appearanceNode, 'reader');
138138
$appearanceData['default'] = $this->getAttributeValue($appearanceNode, 'default');
139139
$formNode = $appearanceNode->getElementsByTagName('form')->item(0);

app/code/Magento/PageBuilder/Model/Stage/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private function flattenContentTypeData(string $name, array $contentType)
204204
'additional_data' => isset($contentType['additional_data'])
205205
? $this->additionalDataParser->toArray($contentType['additional_data'])
206206
: [],
207-
'is_visible' => isset($contentType['is_visible']) && $contentType['is_visible'] === 'false' ? false : true
207+
'is_system' => isset($contentType['is_system']) && $contentType['is_system'] === 'false' ? false : true
208208
];
209209
}
210210

dev/tests/api-functional/testsuite/Magento/PageBuilder/Api/ProductAttributeRepositoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ private function createPageBuilderAttribute($attributeCode)
4444
"default_value" => "",
4545
"frontend_input" => "textarea",
4646
"is_wysiwyg_enabled" => 1,
47-
"is_visible_on_front" => true,
47+
"is_system_on_front" => true,
4848
"is_searchable" => true,
49-
"is_visible_in_advanced_search" => true,
49+
"is_system_in_advanced_search" => true,
5050
"is_filterable" => true,
5151
"is_filterable_in_search" => true,
5252
\Magento\Framework\Api\ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY => [

dev/tests/integration/_files/Magento/TestModulePageBuilderDataMigration/Setup/InstallSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
484484
['unsigned' => true, 'nullable' => false, 'default' => '0'],
485485
'Is WYSIWYG Enabled'
486486
)->addColumn(
487-
'is_visible',
487+
'is_system',
488488
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
489489
null,
490490
['unsigned' => true, 'nullable' => false, 'default' => '1'],

dev/tests/integration/testsuite/Magento/PageBuilder/_files/content_type/expected_merged_array.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
'appearances' => [
4141
'default' => [
4242
'preview_template' => 'Path/to/preview/template',
43-
'render_template' => 'Path/to/render/template',
43+
'master_template' => 'Path/to/render/template',
4444
'elements' => [
4545
'main' => [
4646
'style' => [
@@ -218,7 +218,7 @@
218218
'icon' => 'pagebuilder-type2-custom-icon',
219219
'component' => 'Path/to/custom/component',
220220
'preview_component' => 'Path/to/preview/custom/component',
221-
'is_visible' => 'false',
221+
'is_system' => 'false',
222222
'form' => 'pagebuilder_type2_custom_form',
223223
'group' => 'group2',
224224
'allowed_parents' => [
@@ -230,7 +230,7 @@
230230
'data2' => 'value2',
231231
'data3' => 'value3',
232232
'preview_template' => 'Path/to/preview/custom/template',
233-
'render_template' => 'Path/to/render/custom/template',
233+
'master_template' => 'Path/to/render/custom/template',
234234
'elements' => [
235235
'first_element' => [
236236
'style' => [
@@ -500,7 +500,7 @@
500500
],
501501
'appearance1' => [
502502
'preview_template' => 'Path/to/preview/template',
503-
'render_template' => 'Path/to/render/template',
503+
'master_template' => 'Path/to/render/template',
504504
'elements' => [
505505
'main' => [
506506
'style' => [
@@ -546,21 +546,21 @@
546546
],
547547
'appearance2' => [
548548
'preview_template' => 'Path/to/preview/template',
549-
'render_template' => 'Path/to/render/template',
549+
'master_template' => 'Path/to/render/template',
550550
'default' => 'false',
551551
'converters' => [],
552552
'reader' => 'Path/to/reader'
553553
],
554554
'appearance3' => [
555555
'preview_template' => 'Path/to/preview/template',
556-
'render_template' => 'Path/to/render/template',
556+
'master_template' => 'Path/to/render/template',
557557
'converters' => [],
558558
'default' => 'false',
559559
'reader' => null
560560
],
561561
'appearance4' => [
562562
'preview_template' => 'Path/to/preview/template',
563-
'render_template' => 'Path/to/render/template',
563+
'master_template' => 'Path/to/render/template',
564564
'elements' => [
565565
'main' => [
566566
'style' => [
@@ -621,7 +621,7 @@
621621
'appearances' => [
622622
'default' => [
623623
'preview_template' => 'Path/to/preview/template',
624-
'render_template' => 'Path/to/render/template',
624+
'master_template' => 'Path/to/render/template',
625625
'elements' => [
626626
'main' => [
627627
'style' => [

dev/tests/integration/testsuite/Magento/PageBuilder/_files/content_type/type3_expected_merged_array.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'appearances' => [
2222
'default' => [
2323
'preview_template' => 'Path/to/preview/template',
24-
'render_template' => 'Path/to/render/template',
24+
'master_template' => 'Path/to/render/template',
2525
'elements' => [
2626
'main' => [
2727
'style' => [

0 commit comments

Comments
 (0)