$return['eqLogics'] = array(); if (init('object_id') == '') { foreach (object::all() as $object) { foreach ($object->getEqLogic(true, false, 'sonos3') as $sonos) { $return['eqLogics'][] = $sonos->toHtml(init('version')); } } } else { foreach ($object->getEqLogic(true, false, 'sonos3') as $sonos) { $return['eqLogics'][] = $sonos->toHtml(init('version')); } foreach (object::buildTree($object) as $child) { $sonoss = $child->getEqLogic(true, false, 'sonos3'); if (count($sonoss) > 0) { foreach ($sonoss as $sonos) { $return['eqLogics'][] = $sonos->toHtml(init('version')); } } } } ajax::success($return); } if (init('action') == 'updateSonos') { sonos3::updateSonos(); ajax::success(); } throw new Exception(__('Aucune méthode correspondante à : ', __FILE__) . init('action')); /* * *********Catch exeption*************** */ } catch (Exception $e) { ajax::error(displayExeption($e), $e->getCode()); }