public function getProductPositionsByCategory($category)
    {
        $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;
        if (is_object($category)) {
            if ($category->getUseStorePositions()) {
                $storeId = $category->getStoreId();
            }
            $category = $category->getId();
        }

        return $this->getProductPositions($category, $storeId);
    }
public function getProductPositionsByCategory($category)
    {
        $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;
        if (is_object($category)) {
            if ($category->getUseStorePositions()) {
                $storeId = $category->getStoreId();
            }
            $category = $category->getId();
        }

        return $this->getProductPositions($category, $storeId);
    }
public function getProductPositionsByCategory ( $ category ) { $ storeId = \ Magento \ Store \ Model \ Store :: DEFAULT_STORE_ID ; if ( is_object ( $ category ) ) { if ( $ category -> getUseStorePositions ( ) ) { $ storeId = $ category -> getStoreId ( ) ; } $ category = $ category -> getId ( ) ; } return $ this -> getProductPositions ( $ category , $ storeId ) ; }
Load product positions for the given category.

@param CategoryInterface|int $category Category.

@return array
Load product positions for the given category .