public function moveRank(Application $app, Request $request)
{
if ($request->isXmlHttpRequest()) {
$ranks = $request->request->all();
foreach ($ranks as $deliveryId => $rank) {
$Delivery = $app['eccube.repository.delivery']->find($deliveryId);
$Delivery->setRank($rank);
$app['orm.em']->persist($Delivery);
}
$app['orm.em']->flush();
}
return true;
}