type = $type; $this->init_authperso_id(); } public function set_properties_from_form() { global $authperso_id; parent::set_properties_from_form(); if (!empty($authperso_id)) { $this->type = "authperso_".$authperso_id; } } protected function get_authperso_selector() { global $tpl_form_facette_authperso_selector, $charset; $authpersos = authpersos::get_authpersos(); $options = ""; foreach($authpersos as $authperso) { $options .= ""; } $html = str_replace("!!authperso_options!!", $options, $tpl_form_facette_authperso_selector); return $html; } private function init_authperso_id() { $authperso = preg_split("#_([\d]+)#", $this->type, 0 ,PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); if (!empty($authperso[1]) && intval($authperso[1])) { $this->authperso_id = $authperso[1]; } } }