Пример #1
0
 /**
  * @param Group $group
  * @return array
  */
 public function getStoreCollection(Group $group)
 {
     return $group->getStores();
 }
Пример #2
0
 /**
  * Verify if selected default store is active
  *
  * @param array $postData
  * @param \Magento\Store\Model\Group $groupModel
  * @return bool
  */
 private function isSelectedDefaultStoreActive(array $postData, \Magento\Store\Model\Group $groupModel)
 {
     if (!empty($postData['group']['default_store_id'])) {
         $defaultStoreId = $postData['group']['default_store_id'];
         if (!empty($groupModel->getStores()[$defaultStoreId]) && !$groupModel->getStores()[$defaultStoreId]->isActive()) {
             return false;
         }
     }
     return true;
 }