/** * @see parent::loadRefsFwd() */ function loadRefsFwd() { // fonction (cabinet) $this->_ref_function = new CFunctions(); $this->_ref_function->load($this->function_id); // rubrique $this->_ref_rubrique = new CRubrique(); $this->_ref_rubrique->load($this->rubrique_id); // mode de paiement $this->_ref_mode_paiement = new CModePaiement(); $this->_ref_mode_paiement->load($this->mode_paiement_id); }
* $Id: edit_rubrique.php 19621 2013-06-20 20:40:45Z phenxdesign $ * * @package Mediboard * @subpackage GestionCab * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 19621 $ */ CCanDo::checkRead(); $user = CMediusers::get(); $user->loadRefsFwd(); $user->_ref_function->loadRefsFwd(); $etablissement = $user->_ref_function->_ref_group->text; $rubrique_id = CValue::get("rubrique_id"); $rubrique = new CRubrique(); $rubrique->load($rubrique_id); // Récupération de la liste des functions $function = new CFunctions(); $listFunc = $function->loadListWithPerms(PERM_EDIT); $where = array(); $itemRubrique = new CRubrique(); $order = "nom DESC"; // Récupération de la liste des rubriques hors fonction $where["function_id"] = "IS NULL"; $listRubriqueGroup = $itemRubrique->loadList($where, $order); $listRubriqueFonction = array(); // Récupération de la liste des rubriques liés aux fonctions foreach ($listFunc as $function) { $where["function_id"] = "= '{$function->function_id}'"; $listRubriqueFonction[$function->text] = $itemRubrique->loadList($where, $order); }