namespace Shopware\Controllers\Backend;
use Shopware\Bundle\StoreFrontBundle\Struct\Search\CustomSorting;
use Shopware\Models\Shop\Shop;
use Shopware_Controllers_Backend_ExtJs;
class ManualSorting extends Shopware_Controllers_Backend_ExtJs
{ public function preDispatch() { parent::
preDispatch();
$this->
get(\Shopware\Components\ShopRegistrationServiceInterface::
class)->
registerShop($this->
getModelManager()->
getRepository(Shop::
class)->
getActiveDefault());
} public function listAction(int
$start = 0, int
$limit = 25, int
$categoryId = 3, int
$sortingId = 1
): void
{ $sorting =
$this->
getSorting($categoryId,
$sortingId);
$products =
$this->
get(\Shopware\Components\ManualSorting\ProductLoaderInterface::
class)->
load($categoryId,
$start,
$limit,
$sorting);
$this->
View()->
assign($products);
}