This pipeline is called in ecrire/public/aiguiller.php after the processes have been run for a CVT form. It is used to supplement the response table or to perform any additional processes.

It accepts the same arguments as the formulaire_charger or formulaire_verifier pipelines. It returns the table of data that are the results of processing (error message, success message, redirection, editable form refresh...).

  1. $rev = pipeline(
  2. 'formulaire_traiter',
  3. 'args' => array('form'=>$form, 'args'=>$args),
  4. 'data' => $rev)
  5. );



The "Licence" plugin, which offers the opportunity to assign a usage licence to articles, uses this pipeline to save the default licence value in the configuration details whenever a new article is created:

  1. function licence_formulaire_traiter($flux){
  2. // if creating a new article, assign it the configured default licence
  3. if ($flux['args']['form'] == 'editer_article' AND $flux['args']['args'][0] == 'new') {
  4. $id_article = $flux['data']['id_article'];
  5. $licence_defaut = lire_config('licence/licence_defaut');
  6. sql_updateq('spip_articles', array('id_licence' => $licence_defaut), 'id_article=' . intval($id_article));
  7. }
  8. return $flux;
  9. }



  • the lire_config() PHP function belongs to the configuration plugin "CFG".
  • in SPIP 2.1, it will be more relevant to use the pre_insertion pipeline for this specific example.

Author Mark Baber Published : Updated : 12/05/17

Translations : English, français