当用户从Magento 2.1中的cms(内容)页面过滤器选项(admin)中选择来自商店切换器的任何商店(或商店视图)时,如何获取store_id?

时间:2016-09-21 10:35:50

标签: magento2

我想在store_id下面的方法

vendor/magento/module-cms/Model/RosourceModel/AbstractCollection.php
protected function joinStoreRelationTable($tableName, $linkField)
{
    if ($this->getFilter('store')) 
    {
          // Here i want store_id ; 
    } 
}

因为我想得到我的自定义集合,并希望在上面的方法中分配网格(这是UI的概念) - Magento 2.1 enter image description here

1 个答案:

答案 0 :(得分:0)

检查您将了解的相同功能

print_r($this->getFilter('store')->getData());

Array
(
    [field] => store
    [value] => Array
        (
            [in] => Array
                (
                    [eq] => 1
                )

) [type] => public

相关问题