Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
enhanced.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
18 ?>
19 
20 <?php if ($block->isShow()): ?>
21 <div class="field field-store-switcher">
22  <label class="label" for="store_switcher"><?= /* @escapeNotVerified */ __('Show Report For:') ?></label>
23  <div class="control">
24  <select
25  id="store_switcher"
26  class="admin__control-select"
27  name="store_switcher"
28  onchange="return switchStore(this);">
29  <option value=""><?= /* @escapeNotVerified */ __('All Websites') ?></option>
30  <?php foreach ($block->getWebsiteCollection() as $_website): ?>
31  <?php $showWebsite = false; ?>
32  <?php foreach ($block->getGroupCollection($_website) as $_group): ?>
33  <?php $showGroup = false; ?>
34  <?php foreach ($block->getStoreCollection($_group) as $_store): ?>
35  <?php if ($showWebsite == false): ?>
36  <?php $showWebsite = true; ?>
37  <option website="true" value="<?= /* @escapeNotVerified */ implode(',', $_website->getStoreIds()) ?>"<?php if ($block->getRequest()->getParam('store_ids') == implode(',', $_website->getStoreIds())): ?> selected<?php endif; ?>><?= $block->escapeHtml($_website->getName()) ?></option>
38  <?php endif; ?>
39  <?php if ($showGroup == false): ?>
40  <?php $showGroup = true; ?>
41  <option group="true" value="<?= /* @escapeNotVerified */ implode(',', $_group->getStoreIds()) ?>"<?php if ($block->getRequest()->getParam('store_ids') == implode(',', $_group->getStoreIds())): ?> selected<?php endif; ?>>&nbsp;&nbsp;&nbsp;<?= $block->escapeHtml($_group->getName()) ?></option>
42  <?php endif; ?>
43  <option value="<?= /* @escapeNotVerified */ $_store->getId() ?>"<?php if ($block->getStoreId() == $_store->getId()): ?> selected<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?= $block->escapeHtml($_store->getName()) ?></option>
44  <?php endforeach; ?>
45  <?php if ($showGroup): ?>
46  </optgroup>
47  <?php endif; ?>
48  <?php endforeach; ?>
49  <?php endforeach; ?>
50  </select>
51  </div>
52  <?= $block->getHintHtml() ?>
53 </div>
54 <script>
55 require(['prototype'], function(){
56 
57  switchStore = function(obj){
58  var storeParam = obj.value ? 'store_ids/' + obj.value + '/' : '';
59  if(obj.switchParams){
60  storeParam+= obj.switchParams;
61  }
62  setLocation('<?= /* @escapeNotVerified */ $block->getSwitchUrl() ?>'+storeParam);
63  }
64 
65 });
66 </script>
67 <?php endif; ?>
if( $websites=$block->getWebsites())(__( 'Choose Store View:')) ?></label >< div class $showWebsite
Definition: store.phtml:20
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
__()
Definition: __.php:13
$block
Definition: block.php:8
$_count $_index $_prevOptionId if($block->getOrderOptions()|| $_item->getDescription()) foreach( $items as $_item)( $_item) ?><?php $attributes if( $_item->getOrderItem() ->getParentItem())($_prevOptionId !=$attributes['option_id'])</td >< td > & nbsp
Definition: renderer.phtml:33
if( $block->isShow())( 'Show Report For:') ?></label >< div class foreach($block->getWebsiteCollection() as $_website) foreach($block->getGroupCollection($_website) as $_group) foreach( $block->getStoreCollection( $_group) as $_store)($showWebsite==false) if($block->getRequest() ->getParam('store_ids')==implode(',', $_website->getStoreIds())) endif
Definition: enhanced.phtml:37
if($block->getStoreId()==$_store->getId()) endforeach
Definition: enhanced.phtml:43