/** * Update services position. */ public function executeUpdateServicesPosition() { $services_sorts = $this->getParameter('position'); foreach ($services_sorts as $position => $service_ids) { $services_sort = new AB_Service(); $services_sort->load($service_ids); $services_sort->set('position', $position); $services_sort->save(); } }