![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/mageworx/module-seoall/Ui/Component/Listing/Column/ |
<?php /** * Copyright © 2018 MageWorx. All rights reserved. * See LICENSE.txt for license details. */ namespace MageWorx\SeoAll\Ui\Component\Listing\Column; use Magento\Store\Ui\Component\Listing\Column\Store as UiStore; class StoreSimple extends UiStore { /** * Get data * * @param array $item * @return string */ protected function prepareItem(array $item) { $content = ''; if ($item[$this->storeKey] === '0') { $origStores = '0'; } else { if (!empty($item[$this->storeKey])) { $origStores = $item[$this->storeKey]; } if (empty($origStores)) { return ''; } } if (!is_array($origStores)) { $origStores = [$origStores]; } if (in_array(0, $origStores) && count($origStores) == 1) { return __('All Store Views'); } $data = $this->systemStore->getStoresStructure(false, $origStores); foreach ($data as $website) { $content .= $website['label'] . "<br/>"; foreach ($website['children'] as $group) { $content .= str_repeat(' ', 3) . $this->escaper->escapeHtml($group['label']) . "<br/>"; foreach ($group['children'] as $store) { $content .= str_repeat(' ', 6) . $this->escaper->escapeHtml($store['label']) . "<br/>"; } } } return $content; } }