@@ -75,16 +75,17 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
7575 * @param \Magefan\Blog\Api\CategoryRepositoryInterface|null $categoryRepository
7676 */
7777 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 ,
8080 \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+ {
8889 parent ::__construct ($ entityFactory , $ logger , $ fetchStrategy , $ eventManager , $ connection , $ resource );
8990 $ this ->_date = $ date ;
9091 $ this ->_storeManager = $ storeManager ;
@@ -165,7 +166,7 @@ public function addFieldToFilter($field, $condition = null)
165166
166167 /**
167168 * Add store filter to collection
168- * @param array|int|\Magento\Store\Model\Store $store
169+ * @param array|int|\Magento\Store\Model\Store $store
169170 * @param boolean $withAdmin
170171 * @return $this
171172 */
@@ -227,7 +228,7 @@ public function addRecentFilter()
227228
228229 /**
229230 * Add posts filter to collection
230- * @param array|int|string $category
231+ * @param array|int|string $category
231232 * @return $this
232233 */
233234 public function addPostsFilter ($ postIds )
@@ -254,7 +255,7 @@ public function addPostsFilter($postIds)
254255
255256 /**
256257 * Add category filter to collection
257- * @param array|int|\Magefan\Blog\Model\Category $category
258+ * @param array|int|\Magefan\Blog\Model\Category $category
258259 * @return $this
259260 */
260261 public function addCategoryFilter ($ category )
@@ -442,7 +443,7 @@ public function getSearchRateExpression($term, array $columns): string
442443
443444 /**
444445 * 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
446447 * @return $this
447448 */
448449 public function addTagFilter ($ tag )
@@ -520,7 +521,7 @@ public function addTagFilter($tag)
520521
521522 /**
522523 * Add author filter to collection
523- * @param array|int|\Magefan\Blog\Model\Author $author
524+ * @param array|int|\Magefan\Blog\Model\Author $author
524525 * @return $this
525526 */
526527 public function addAuthorFilter ($ author )
@@ -727,8 +728,8 @@ protected function _renderFiltersBefore()
727728 /**
728729 * Add select order
729730 *
730- * @param string $field
731- * @param string $direction
731+ * @param string $field
732+ * @param string $direction
732733 * @return $this
733734 */
734735 public function setOrder ($ field , $ direction = self ::SORT_ORDER_DESC )
@@ -740,4 +741,12 @@ public function setOrder($field, $direction = self::SORT_ORDER_DESC)
740741 }
741742 return $ this ;
742743 }
744+
745+ /**
746+ * @return int
747+ */
748+ public function getStoreId ():int
749+ {
750+ return (int )$ this ->_storeId ;
751+ }
743752}
0 commit comments