Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > libelle_association_mots

libelle_association_mots

The libelle_association_mots pipeline is called in ecrire/exec/mots_tous.php to display the text description of the elements that can be linked to a given keyword group. Each object is associated with a language string identifier:

  1. $libelles = array(
  2. 'articles'=>'info_articles_2',
  3. 'breves'=>'info_breves_02',
  4. 'rubriques'=>'info_rubriques',
  5. 'syndic'=>'icone_sites_references'
  6. );
  7. $libelles = pipeline('libelle_association_mots', $libelles);

Download

So the pipeline is passed an associative array with keys being the object names (written in the plural) and values being the names of the corresponding language string identifier.

Example

The "Mots objets" plugin is used to add keywords for authors and documents, and so passes the corresponding language string identifiers for those objects as shown below:

  1. function mots_objets_libelle_association_mots($flux){
  2.  
  3. $flux['auteurs'] = 'mots_objets:objet_auteurs';
  4.  
  5. $flux['documents'] = 'gestdoc:objet_documents';
  6. // plugin mediatheque
  7. return $flux;
  8.  
  9. }

Download