当前位置: 首页>>代码示例>>PHP>>正文


PHP Website::getStoreIds方法代码示例

本文整理汇总了PHP中Magento\Store\Model\Website::getStoreIds方法的典型用法代码示例。如果您正苦于以下问题:PHP Website::getStoreIds方法的具体用法?PHP Website::getStoreIds怎么用?PHP Website::getStoreIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Store\Model\Website的用法示例。


在下文中一共展示了Website::getStoreIds方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: afterGetDefaultStore

 /**
  * @param \Magento\Store\Model\Website $subject
  * @param \Magento\Store\Model\Store $store
  * @return \Magento\Store\Model\Store
  */
 public function afterGetDefaultStore(Website $subject, Store $store)
 {
     if ($this->generalConfig->isAvailable() && $this->storeSwitcher->isInitialized()) {
         $storeId = $this->storeSwitcher->getStoreId();
         if ($store->getId() != $storeId && in_array($storeId, $subject->getStoreIds())) {
             $store = $this->storeRepository->getById($storeId);
         }
     }
     return $store;
 }
开发者ID:ytorbyk,项目名称:magento2-geo-store-switcher,代码行数:15,代码来源:GeoWebsite.php

示例2: getStoreIds

 /**
  * {@inheritdoc}
  */
 public function getStoreIds()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getStoreIds');
     if (!$pluginInfo) {
         return parent::getStoreIds();
     } else {
         return $this->___callPlugins('getStoreIds', func_get_args(), $pluginInfo);
     }
 }
开发者ID:HaonanXu,项目名称:der-snack-backup,代码行数:12,代码来源:Interceptor.php

示例3: testGetStoreIds

 public function testGetStoreIds()
 {
     $this->assertEquals(array(1 => 1), $this->_model->getStoreIds());
 }
开发者ID:aiesh,项目名称:magento2,代码行数:4,代码来源:WebsiteTest.php

示例4: testGetStoreIds

 public function testGetStoreIds()
 {
     $this->assertEquals([1 => 1], $this->_model->getStoreIds());
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:4,代码来源:WebsiteTest.php

示例5: _getReviewsToExport

 /**
  * Get reviews for export.
  *
  * @param \Magento\Store\Model\Website $website
  * @param int $limit
  *
  * @return mixed
  */
 public function _getReviewsToExport(\Magento\Store\Model\Website $website, $limit = 100)
 {
     return $this->reviewCollection->create()->addFieldToFilter('review_imported', ['null' => 'true'])->addFieldToFilter('store_id', ['in' => $website->getStoreIds()])->setPageSize($limit);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:12,代码来源:Review.php

示例6: getModifiedWishlistToImport

 /**
  * Get wishlists marked as modified for website.
  *
  * @param \Magento\Store\Model\Website $website
  * @param int $limit
  *
  * @return mixed
  */
 public function getModifiedWishlistToImport(\Magento\Store\Model\Website $website, $limit = 100)
 {
     $collection = $this->wishlistCollection->create()->addFieldToFilter('wishlist_modified', 1)->addFieldToFilter('store_id', ['in' => $website->getStoreIds()]);
     $collection->getSelect()->limit($limit);
     return $collection;
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:14,代码来源:Wishlist.php

示例7: getSubscribersToImport

 /**
  * Contact subscribers to import for website.
  *
  * @param \Magento\Store\Model\Website $website
  * @param int $limit
  *
  * @return $this
  */
 public function getSubscribersToImport(\Magento\Store\Model\Website $website, $limit = 1000)
 {
     $storeIds = $website->getStoreIds();
     $collection = $this->getCollection()->addFieldToFilter('is_subscriber', ['notnull' => true])->addFieldToFilter('subscriber_status', '1')->addFieldToFilter('subscriber_imported', ['null' => true])->addFieldToFilter('store_id', ['in' => $storeIds]);
     $collection->getSelect()->limit($limit);
     return $collection;
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:15,代码来源:Contact.php


注:本文中的Magento\Store\Model\Website::getStoreIds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。