function getLignes() { $dao = CopixDAOFactory::create('adresseligne'); $criteres = CopixDAOFactory::createSearchConditions(); $criteres->addCondition('id_adresse', '=', $this->id); return $dao->findBy($criteres); }
/** * Permet de récupèrer la liste des adresses * de la personne * @return Une liste d'objets adresse */ function getAdresses() { $dao = CopixDAOFactory::create('adresse'); $criteres = CopixDAOFactory::createSearchConditions(); $criteres->addCondition('id_pers', '=', $this->_compiled->id); return $dao->findBy($criteres); }
function _createContent(&$toReturn) { $tpl =& new CopixTpl(); $dao =& CopixDAOFactory::create('Comment'); $sp =& CopixDAOFactory::createSearchConditions(); $sp->addCondition('id_cmt', '=', $this->params['id']); $sp->addCondition('type_cmt', '=', $this->params['type']); $sp->addItemOrder('position_cmt', 'desc'); $arData = $dao->findBy($sp); if (count($arData) > 0) { $perPage = isset($this->params['perPage']) ? intval($this->params['perPage']) : intval(CopixConfig::get('comment|perPage')); $params = array('perPage' => $perPage, 'delta' => 5, 'recordSet' => $arData, 'template' => '|pager.tpl'); $Pager = CopixPager::Load($params); $tpl->assign('pager', $Pager->GetMultipage()); $tpl->assign('comments', $Pager->data); } $tpl->assign('back', $this->params['back']); $tpl->assign('id', $this->params['id']); $tpl->assign('type', $this->params['type']); $adminEnabled = CopixUserProfile::valueOf('site', 'siteAdmin') >= PROFILE_CCV_MODERATE; $tpl->assign('adminEnabled', $adminEnabled); $plugAuth =& $GLOBALS['COPIX']['COORD']->getPlugin('auth|auth'); $user =& $plugAuth->getUser(); $tpl->assign('login', $user->login); $toReturn = $tpl->fetch('comment.list.tpl'); return true; }
function _createContent(&$toReturn) { $tpl =& new CopixTpl(); $dao = CopixDAOFactory::create('personne'); $criteres = CopixDAOFactory::createSearchConditions(); $idPers = $this->params['idPers']; $criteres->addCondition('id', '=', $idPers); $listePers = $dao->findBy($criteres); $tpl->assign('personne', $listePers[0]); $toReturn = $tpl->fetch('detailpers.tpl'); return true; }
function _createContent(&$toReturn) { $tpl =& new CopixTpl(); $dao =& CopixDAOFactory::create('comment|comment'); $sp =& CopixDAOFactory::createSearchConditions(); $sp->addItemOrder('date_cmt', 'desc'); $sp->addItemOrder('position_cmt', 'desc'); $arComments = array(); $arComments = $dao->findby($sp); if (count($arComments) > 0) { $perPage = intval(CopixConfig::get('comment|quickAdminPerPage')); $params = array('perPage' => $perPage, 'delta' => 5, 'recordSet' => $arComments, 'template' => '|pager.tpl'); $pager = CopixPager::Load($params); $tpl->assign('pager', $pager->GetMultipage()); $tpl->assign('comments', $pager->data); } $toReturn = $lastComments === array() ? '' : $tpl->fetch('comment.quickadmin.tpl'); return true; }