Initial commit
This commit is contained in:
commit
a998a1b84b
3 changed files with 414 additions and 0 deletions
54
class/actions_adddesctoservicelist.class.php
Normal file
54
class/actions_adddesctoservicelist.class.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue