private function setSortedProducts(CategoryInterface $category) { $productPositions = $this->getRequest()->getParam('product_position', []); $category->setSortedProductIds(array_keys($productPositions)); return $this; }