Ejemplo n.º 1
0
 /**
  * Configuration de smarty, chargement d'une instance du moteur. 
  *
  * @todo caching conditionnel
  * @return Afup_Directory_Template
  */
 public function Afup_Directory_Template()
 {
     $this->Smarty();
     $this->template_dir = Afup::getLibraryPath() . '/../templates/directory/';
     $this->compile_dir = Afup::getLibraryPath() . '/../cache/templates/directory/';
     $this->config_dir = Afup::getLibraryPath() . '/';
     $this->cache_dir = Afup::getLibraryPath() . '/../cache/templates/directory/cache/';
     $this->caching = false;
 }
Ejemplo n.º 2
0
 /**
  * Inclusion d'une classe.
  *
  * @param string $class
  */
 public static function includeClass($class)
 {
     $classPath = strtr($class, '_', '/') . '.php';
     Afup::includeOnce($classPath);
 }
Ejemplo n.º 3
0
 /**
  * Affichage du détail d'une entreprise. 
  *
  * @param array $get
  * @param array $post
  * @param array $errors
  * @return boolean
  */
 public function detailAction($get, $post, $errors)
 {
     Afup::includeClass('Afup_Directory');
     Afup::includeClass('Afup_Directory_Config');
     //$params = array('criteria' => array('Valide' => '1'));
     $member = $this->getAfupDirectory()->getDirectoryMember($get['id']);
     $this->template->assign('member', $member);
     $this->template->assign('formeJuridique', Afup_Directory_Config::getLegalStatus($member->getFormeJuridique()));
     $this->template->assign('zone', Afup_Directory_Config::getZone($member->getZone()));
     $this->template->assign('tailleSociete', Afup_Directory_Config::getCompanySize($member->getTailleSociete()));
     return $member;
 }