Skip to content
Extraits de code Groupes Projets
Valider e72e7e7a rédigé par nicod's avatar nicod
Parcourir les fichiers

PhpDoc

parent 3b2aefa4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,10 +13,22 @@ if (!defined('_ECRIRE_INC_VERSION')) { ...@@ -13,10 +13,22 @@ if (!defined('_ECRIRE_INC_VERSION')) {
return; return;
} }
/**
* Sérialisation de données (saisies ou valeurs)
*
* @param $data
* @return false|string
*/
function blocks_serialize($data) { function blocks_serialize($data) {
return json_encode($data); return json_encode($data);
} }
/**
* Désérialisation de données (saisies ou valeurs)
*
* @param $data
* @return mixed
*/
function blocks_deserialize($data) { function blocks_deserialize($data) {
return json_decode($data ?? '', true); return json_decode($data ?? '', true);
} }
...@@ -139,6 +151,13 @@ function _block_charger_block($id_bloc) { ...@@ -139,6 +151,13 @@ function _block_charger_block($id_bloc) {
return recuperer_fond($squelette, $contexte); return recuperer_fond($squelette, $contexte);
} }
/**
* Générer le titre d'un bloc
* composé de son type et du titre de l'objet auquel il est lié
*
* @param $id_bloc
* @return mixed|string
*/
function generer_TITRE_BLOC($id_bloc){ function generer_TITRE_BLOC($id_bloc){
$infos = sql_fetsel( $infos = sql_fetsel(
'bt.titre, bl.objet, bl.rang_lien, bl.id_objet', 'bt.titre, bl.objet, bl.rang_lien, bl.id_objet',
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter