$product =
$this->
getManager()->
find(Product::
class,
$sorting['product_id'
]);
if (!
$product instanceof Product
) { throw new ModelNotFoundException(Product::
class,
$sorting['product_id'
]);
} $sortingObj->
setProduct($product);
$sortingObj->
setPosition((int) $sorting['position'
]);
$collection[] =
$sortingObj;
} $category->
setManualSorting(null
);
$this->
getManager()->
flush($category);
$category->
setManualSorting($collection);
unset($data['manualSorting'
]);
return $data;
} /**
* Returns all none association property of the category class.
*
* @return string[]
*/