adddesctoservicelist/class/actions_adddesctoservicelist.class.php
2018-08-17 00:00:54 +02:00

54 lines
2.7 KiB
PHP

<?php
class ActionsAddDescToServiceList
{
/**
* Overloading the printFieldListTitle function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string &$action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
function printFieldListTitle($parameters, &$object, &$action, $hookmanager)
{
/*
if ($parameters['context'] != 'contractservicelist:main')
return 0;
*/
$this->resprints = print_liste_field_titre('Description du service', $_SERVER["PHP_SELF"], "cd.description", "", $parameters['param'],"",$parameters['sortfield'], $parameters['sortorder']);
return 0;
}
/**
* Overloading the printFieldListOption function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string &$action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
function printFieldListOption($parameters, &$object, &$action, $hookmanager)
{
// No filter, sort order, etc. at the moment (TODO ?)
$this->resprints = '<td class="liste_titre"></td>';
return 0;
}
/**
* Overloading the printFieldListValue function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string &$action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
function printFieldListValue($parameters, &$object, &$action, $hookmanager)
{
$this->resprints = '<td>' . dol_escape_htmltag($parameters['obj']->description) . '</td>';
return 0;
}
}