function insert($path, $description) { $instance =& CopixCapacities::instance(); if (!in_array($path, $instance->capacities)) { $ct = CopixDbFactory::getConnection(); $toSet['ID_CCAP'] = $ct->quote($path, false); $toSet['DESCRIPTION_CCAP'] = $ct->quote($description, false); return $ct->doInsert('copixcapacities', $toSet); } }
/** * Attends un objet de type textpage en paramètre. */ function _createContent(&$toReturn) { $tpl =& new CopixTpl(); //assignation de la liste des profils connus. $profile =& new DAOCopixProfile(); $tpl->assign('profile', $this->params['profile']); $tpl->assign('capacitiesDescriptions', CopixCapacities::getList()); //appel du template. $toReturn = $tpl->fetch('profile|profile.edit.tpl'); return true; }