* @author Delphine CAUQUIL * @copyright 2012 Tela-Botanica * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3 * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 * @version $Id$ */ class Textes extends Eflore { private $id = ''; private $format = 'htm';//Valeurs possibles : htm, txt private $sectionTitre = ''; public function setId($id) { $this->id = $id; } public function setFormat($format) { $this->format = $format; } public function setSectionTitre($titre) { $this->sectionTitre = $titre; } public function getTexte() { if ($this->sectionTitre != '') { $tpl = Config::get('texteTitreSectionTpl'); $params = array('id' => $this->id, 'txtFormat' => $this->format, 'sectionTitre' => $this->sectionTitre); } else { $tpl = Config::get('texteTpl'); $params = array('id' => $this->id, 'txtFormat' => $this->format); } return $this->chargerDonnees($this->formaterUrl($tpl, $params)); } public function getPageUrl() { $url = ''; if(Config::get($this->getProjet().'LienPageTpl')) { $tpl = Config::get($this->getProjet().'LienPageTpl'); $params = array('id' => $this->id, 'langue' => 'fr'); $url = $this->formaterUrl($tpl, $params); } return $url; } } ?>