forked from spip-contrib-extensions/declinaisons
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Utilisations de pipelines par Déclinaisons Prix
|
|
*
|
|
* @plugin Déclinaisons Prix
|
|
* @copyright 2012 - 2020
|
|
* @author Rainer Müller
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Promotions_commandes\Pipelines
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION'))
|
|
return;
|
|
|
|
/**
|
|
* Declare l'object pour le Plugin shop https://github.com/abelass/shop.
|
|
*
|
|
* @pipeline shop_objets
|
|
*
|
|
* @param array $flux
|
|
* Données du pipeline
|
|
* @return array
|
|
*/
|
|
function declinaisons_shop_objets($flux) {
|
|
$flux['data']['declinaisons'] = array(
|
|
'action' => 'declinaisons',
|
|
'nom_action' => _T('declinaison:titre_declinaisons'),
|
|
'icone' => 'declinaisons-16.png'
|
|
);
|
|
|
|
return $flux;
|
|
}
|
|
|
|
/**
|
|
* Déclare les champs extras pour le formulaire prix.
|
|
*
|
|
* @pipeline prix_objets_extensions
|
|
*
|
|
* @param array $flux
|
|
* Données du pipeline
|
|
* @return array
|
|
*/
|
|
function declinaisons_prix_objets_extensions($flux) {
|
|
$flux['data']['declinaison'] = array (
|
|
array(
|
|
'saisie' => 'declinaisons',
|
|
'options' => array(
|
|
'nom' => 'id_prix_extension_declinaison',
|
|
'label' => _T('declinaison:choisir_declinaison'),
|
|
'option_intro' => _T('declinaison:info_aucun_declinaison'),
|
|
'defaut' => $flux['id_prix_extension_objet'],
|
|
'class' => 'chosen',
|
|
'multiple' => 'oui',
|
|
)
|
|
),
|
|
array(
|
|
'saisie' => 'ajouter_action',
|
|
'options' => array(
|
|
'nom' => 'ajouter_declinaison',
|
|
'label_action' => _T('declinaison:icone_creer_declinaison'),
|
|
'objet' => 'declinaison',
|
|
)
|
|
),
|
|
);
|
|
|
|
return $flux;
|
|
}
|