本文整理汇总了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;
}
示例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);
}
}
示例3: testGetStoreIds
public function testGetStoreIds()
{
$this->assertEquals(array(1 => 1), $this->_model->getStoreIds());
}
示例4: testGetStoreIds
public function testGetStoreIds()
{
$this->assertEquals([1 => 1], $this->_model->getStoreIds());
}
示例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);
}
示例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;
}
示例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;
}