Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
switcher.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php /* @var $block \Magento\Backend\Block\Template */ ?>
11 <div class="field field-store-switcher">
12  <label class="label" for="store_switcher"><?= /* @escapeNotVerified */ __('Current Configuration Scope:') ?></label>
13  <div class="control">
14  <select id="store_switcher" class="system-config-store-switcher" onchange="location.href=this.options[this.selectedIndex].getAttribute('url')">
15  <?php foreach ($block->getStoreSelectOptions() as $_value => $_option): ?>
16  <?php if (isset($_option['is_group'])): ?>
17  <?php if ($_option['is_close']): ?>
18  </optgroup>
19  <?php else: ?>
20  <optgroup label="<?= $block->escapeHtml($_option['label']) ?>" style="<?= /* @escapeNotVerified */ $_option['style'] ?>">
21  <?php endif; ?>
22  <?php continue ?>
23  <?php endif; ?>
24  <option value="<?= $block->escapeHtml($_value) ?>" url="<?= /* @escapeNotVerified */ $_option['url'] ?>" <?= $_option['selected'] ? 'selected="selected"' : '' ?> style="<?= /* @escapeNotVerified */ $_option['style'] ?>">
25  <?= $block->escapeHtml($_option['label']) ?>
26  </option>
27  <?php endforeach ?>
28  </select>
29  </div>
30  <?= $block->getHintHtml() ?>
31  <?php if ($block->getAuthorization()->isAllowed('Magento_Backend::store')): ?>
32  <div class="actions">
33  <a href="<?= /* @escapeNotVerified */ $block->getUrl('*/system_store') ?>"><?= /* @escapeNotVerified */ __('Stores') ?></a>
34  </div>
35  <?php endif; ?>
36 </div>
$_option
Definition: checkbox.phtml:11
$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
$_value
Definition: tax.phtml:15
foreach($block->getWebsiteCollection() as $_website) foreach($block->getGroupCollection($_website) as $_group) foreach( $block->getStoreCollection( $_group) as $_store)($showWebsite==false) if($block->getRequest() ->getParam('website')==$_website->getId()) endif
Definition: switcher.phtml:21
if($block->getStoreId()==$_store->getId()) endforeach
Definition: switcher.phtml:28