@@ -75,16 +75,17 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
75
75
* @param \Magefan\Blog\Api\CategoryRepositoryInterface|null $categoryRepository
76
76
*/
77
77
public function __construct (
78
- \Magento \Framework \Data \Collection \EntityFactory $ entityFactory ,
79
- \Psr \Log \LoggerInterface $ logger ,
78
+ \Magento \Framework \Data \Collection \EntityFactory $ entityFactory ,
79
+ \Psr \Log \LoggerInterface $ logger ,
80
80
\Magento \Framework \Data \Collection \Db \FetchStrategyInterface $ fetchStrategy ,
81
- \Magento \Framework \Event \ManagerInterface $ eventManager ,
82
- \Magento \Framework \Stdlib \DateTime \DateTime $ date ,
83
- \Magento \Store \Model \StoreManagerInterface $ storeManager ,
84
- $ connection = null ,
85
- ?\Magento \Framework \Model \ResourceModel \Db \AbstractDb $ resource = null ,
86
- ?\Magefan \Blog \Api \CategoryRepositoryInterface $ categoryRepository = null
87
- ) {
81
+ \Magento \Framework \Event \ManagerInterface $ eventManager ,
82
+ \Magento \Framework \Stdlib \DateTime \DateTime $ date ,
83
+ \Magento \Store \Model \StoreManagerInterface $ storeManager ,
84
+ $ connection = null ,
85
+ ?\Magento \Framework \Model \ResourceModel \Db \AbstractDb $ resource = null ,
86
+ ?\Magefan \Blog \Api \CategoryRepositoryInterface $ categoryRepository = null
87
+ )
88
+ {
88
89
parent ::__construct ($ entityFactory , $ logger , $ fetchStrategy , $ eventManager , $ connection , $ resource );
89
90
$ this ->_date = $ date ;
90
91
$ this ->_storeManager = $ storeManager ;
@@ -165,7 +166,7 @@ public function addFieldToFilter($field, $condition = null)
165
166
166
167
/**
167
168
* Add store filter to collection
168
- * @param array|int|\Magento\Store\Model\Store $store
169
+ * @param array|int|\Magento\Store\Model\Store $store
169
170
* @param boolean $withAdmin
170
171
* @return $this
171
172
*/
@@ -227,7 +228,7 @@ public function addRecentFilter()
227
228
228
229
/**
229
230
* Add posts filter to collection
230
- * @param array|int|string $category
231
+ * @param array|int|string $category
231
232
* @return $this
232
233
*/
233
234
public function addPostsFilter ($ postIds )
@@ -254,7 +255,7 @@ public function addPostsFilter($postIds)
254
255
255
256
/**
256
257
* Add category filter to collection
257
- * @param array|int|\Magefan\Blog\Model\Category $category
258
+ * @param array|int|\Magefan\Blog\Model\Category $category
258
259
* @return $this
259
260
*/
260
261
public function addCategoryFilter ($ category )
@@ -442,7 +443,7 @@ public function getSearchRateExpression($term, array $columns): string
442
443
443
444
/**
444
445
* Add tag filter to collection
445
- * @param array|int|string|\Magefan\Blog\Model\Tag $tag
446
+ * @param array|int|string|\Magefan\Blog\Model\Tag $tag
446
447
* @return $this
447
448
*/
448
449
public function addTagFilter ($ tag )
@@ -520,7 +521,7 @@ public function addTagFilter($tag)
520
521
521
522
/**
522
523
* Add author filter to collection
523
- * @param array|int|\Magefan\Blog\Model\Author $author
524
+ * @param array|int|\Magefan\Blog\Model\Author $author
524
525
* @return $this
525
526
*/
526
527
public function addAuthorFilter ($ author )
@@ -727,8 +728,8 @@ protected function _renderFiltersBefore()
727
728
/**
728
729
* Add select order
729
730
*
730
- * @param string $field
731
- * @param string $direction
731
+ * @param string $field
732
+ * @param string $direction
732
733
* @return $this
733
734
*/
734
735
public function setOrder ($ field , $ direction = self ::SORT_ORDER_DESC )
@@ -740,4 +741,12 @@ public function setOrder($field, $direction = self::SORT_ORDER_DESC)
740
741
}
741
742
return $ this ;
742
743
}
744
+
745
+ /**
746
+ * @return int
747
+ */
748
+ public function getStoreId ():int
749
+ {
750
+ return (int )$ this ->_storeId ;
751
+ }
743
752
}
0 commit comments