New file |
0,0 → 1,45 |
<?php |
/** |
* Portail d'authentification qui présente les différentes application TB; permet(tra un jour) |
* de se connecter en utilisant d'autres comptes (Plante-net, ils recolmatent, visagelivre...) |
* |
* Utilisation: http://www.tela-botanica.org/widget:reseau:auth |
* Paramètres GET (optionnels): |
* |
* @author Mathias Chouet <mathias@tela-botanica.org> |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @version 0.1 |
* @copyright 2015, Tela Botanica |
*/ |
class Auth extends WidgetCommun { |
|
protected $langue; |
protected $langueDefaut; |
protected $baseUrlAuth; |
|
public function __construct($config, $parametres) { |
parent::__construct($config, $parametres); |
$this->langueDefaut = $this->config['auth']['langueDefaut']; |
$this->baseUrlAuth = $this->config['auth']['baseUrlAuth']; |
} |
|
/** |
* Méthode appelée par défaut pour charger ce widget |
*/ |
public function executer() { |
//$this->collecterParametres(); |
$squelette = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'squelettes' . DIRECTORY_SEPARATOR . 'auth_' . $this->langue . '.tpl.php'; |
if (! file_exists($squelette)) { |
$squelette = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'squelettes' . DIRECTORY_SEPARATOR . 'auth_' . $this->langueDefaut . '.tpl.php'; |
} |
|
$widget['donnees']['url_css'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], 'modules/auth/squelettes/css/defaut.css'); |
$widget['donnees']['url_js'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], 'modules/auth/squelettes/js/defaut.js'); |
$widget['donnees']['baseUrlAuth'] = $this->baseUrlAuth; |
|
$contenu = $this->traiterSquelettePhp($squelette, $widget['donnees']); |
$this->envoyer($contenu); |
} |
} |
?> |