@@ -86,6 +86,8 @@ class Switcher extends \Magento\Backend\Block\Template
86
86
protected $ _storeFactory ;
87
87
88
88
/**
89
+ * Switcher constructor.
90
+ *
89
91
* @param \Magento\Backend\Block\Template\Context $context
90
92
* @param \Magento\Store\Model\WebsiteFactory $websiteFactory
91
93
* @param \Magento\Store\Model\GroupFactory $storeGroupFactory
@@ -106,7 +108,7 @@ public function __construct(
106
108
}
107
109
108
110
/**
109
- * @return void
111
+ * @inheritdoc
110
112
*/
111
113
protected function _construct ()
112
114
{
@@ -130,6 +132,8 @@ protected function _construct()
130
132
}
131
133
132
134
/**
135
+ * Get website collection.
136
+ *
133
137
* @return \Magento\Store\Model\ResourceModel\Website\Collection
134
138
*/
135
139
public function getWebsiteCollection ()
@@ -169,6 +173,8 @@ public function isWebsiteSwitchEnabled()
169
173
}
170
174
171
175
/**
176
+ * Set website variable name.
177
+ *
172
178
* @param string $varName
173
179
* @return $this
174
180
*/
@@ -179,6 +185,8 @@ public function setWebsiteVarName($varName)
179
185
}
180
186
181
187
/**
188
+ * Get website variable name.
189
+ *
182
190
* @return string
183
191
*/
184
192
public function getWebsiteVarName ()
@@ -191,6 +199,8 @@ public function getWebsiteVarName()
191
199
}
192
200
193
201
/**
202
+ * Check if current website selected.
203
+ *
194
204
* @param \Magento\Store\Model\Website $website
195
205
* @return bool
196
206
*/
@@ -200,6 +210,8 @@ public function isWebsiteSelected(\Magento\Store\Model\Website $website)
200
210
}
201
211
202
212
/**
213
+ * Return website Id.
214
+ *
203
215
* @return int|null
204
216
*/
205
217
public function getWebsiteId ()
@@ -211,6 +223,8 @@ public function getWebsiteId()
211
223
}
212
224
213
225
/**
226
+ * Return group collection provided website.
227
+ *
214
228
* @param int|\Magento\Store\Model\Website $website
215
229
* @return \Magento\Store\Model\ResourceModel\Group\Collection
216
230
*/
@@ -247,6 +261,8 @@ public function isStoreGroupSwitchEnabled()
247
261
}
248
262
249
263
/**
264
+ * Sets store group variable name.
265
+ *
250
266
* @param string $varName
251
267
* @return $this
252
268
*/
@@ -257,6 +273,8 @@ public function setStoreGroupVarName($varName)
257
273
}
258
274
259
275
/**
276
+ * Return store group variable name.
277
+ *
260
278
* @return string
261
279
*/
262
280
public function getStoreGroupVarName ()
@@ -269,6 +287,8 @@ public function getStoreGroupVarName()
269
287
}
270
288
271
289
/**
290
+ * Is provided group selected.
291
+ *
272
292
* @param \Magento\Store\Model\Group $group
273
293
* @return bool
274
294
*/
@@ -278,6 +298,8 @@ public function isStoreGroupSelected(\Magento\Store\Model\Group $group)
278
298
}
279
299
280
300
/**
301
+ * Return store group Id.
302
+ *
281
303
* @return int|null
282
304
*/
283
305
public function getStoreGroupId ()
@@ -289,6 +311,8 @@ public function getStoreGroupId()
289
311
}
290
312
291
313
/**
314
+ * Return store collection.
315
+ *
292
316
* @param \Magento\Store\Model\Group|int $group
293
317
* @return \Magento\Store\Model\ResourceModel\Store\Collection
294
318
*/
@@ -328,6 +352,8 @@ public function getStores($group)
328
352
}
329
353
330
354
/**
355
+ * Return store Id.
356
+ *
331
357
* @return int|null
332
358
*/
333
359
public function getStoreId ()
@@ -339,6 +365,8 @@ public function getStoreId()
339
365
}
340
366
341
367
/**
368
+ * Check is provided store selected.
369
+ *
342
370
* @param \Magento\Store\Model\Store $store
343
371
* @return bool
344
372
*/
@@ -358,6 +386,8 @@ public function isStoreSwitchEnabled()
358
386
}
359
387
360
388
/**
389
+ * Sets store variable name.
390
+ *
361
391
* @param string $varName
362
392
* @return $this
363
393
*/
@@ -368,6 +398,8 @@ public function setStoreVarName($varName)
368
398
}
369
399
370
400
/**
401
+ * Return store variable name.
402
+ *
371
403
* @return mixed|string
372
404
*/
373
405
public function getStoreVarName ()
@@ -380,6 +412,8 @@ public function getStoreVarName()
380
412
}
381
413
382
414
/**
415
+ * Return switch url.
416
+ *
383
417
* @return string
384
418
*/
385
419
public function getSwitchUrl ()
@@ -399,6 +433,8 @@ public function getSwitchUrl()
399
433
}
400
434
401
435
/**
436
+ * Checks if scope selected.
437
+ *
402
438
* @return bool
403
439
*/
404
440
public function hasScopeSelected ()
@@ -472,6 +508,8 @@ public function getCurrentStoreName()
472
508
}
473
509
474
510
/**
511
+ * Sets store ids.
512
+ *
475
513
* @param array $storeIds
476
514
* @return $this
477
515
*/
@@ -482,6 +520,8 @@ public function setStoreIds($storeIds)
482
520
}
483
521
484
522
/**
523
+ * Return store ids.
524
+ *
485
525
* @return array
486
526
*/
487
527
public function getStoreIds ()
@@ -490,6 +530,8 @@ public function getStoreIds()
490
530
}
491
531
492
532
/**
533
+ * Check if system is run in the single store mode.
534
+ *
493
535
* @return bool
494
536
*/
495
537
public function isShow ()
@@ -498,6 +540,8 @@ public function isShow()
498
540
}
499
541
500
542
/**
543
+ * Render block.
544
+ *
501
545
* @return string
502
546
*/
503
547
protected function _toHtml ()
0 commit comments