File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/code/Magento/Swatches/Model Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public function getCodes()
72
72
if ($ this ->swatchAttributeCodes === null ) {
73
73
$ swatchAttributeCodesCache = $ this ->cache ->load ($ this ->cacheKey );
74
74
if (false === $ swatchAttributeCodesCache ) {
75
- $ swatchAttributeCodes = $ this ->loadSwatchAttributeCodes ();
75
+ $ swatchAttributeCodes = $ this ->getSwatchAttributeCodes ();
76
76
$ this ->cache ->save (json_encode ($ swatchAttributeCodes ), $ this ->cacheKey , $ this ->cacheTags );
77
77
} else {
78
78
$ swatchAttributeCodes = json_decode ($ swatchAttributeCodesCache , true );
@@ -86,9 +86,11 @@ public function getCodes()
86
86
/**
87
87
* Returns list of known swatch attributes.
88
88
*
89
+ * Returns a map of id and code for all EAV attributes with swatches
90
+ *
89
91
* @return array
90
92
*/
91
- private function loadSwatchAttributeCodes ()
93
+ private function getSwatchAttributeCodes ()
92
94
{
93
95
$ select = $ this ->resourceConnection ->getConnection ()->select ()
94
96
->from (
@@ -108,6 +110,8 @@ private function loadSwatchAttributeCodes()
108
110
/**
109
111
* Returns Select for attributes Ids.
110
112
*
113
+ * Builds a "Select" object which loads all EAV attributes that has "swatch" options
114
+ *
111
115
* @return Select
112
116
*/
113
117
private function getAttributeIdsSelect ()
You can’t perform that action at this time.
0 commit comments