44 public $errors = array();
50 public $results = array();
79 public function getNomUrl($parameters, &$object, &$action)
81 global $db, $langs, $conf, $user;
82 $this->resprints =
'';
95 public function doActions($parameters, &$object, &$action, $hookmanager)
97 global $conf, $user, $langs;
102 if (in_array($parameters[
'currentcontext'], array(
'somecontext1',
'somecontext2')))
109 $this->results = array(
'myreturn' => 999);
110 $this->resprints =
'A text to show';
113 $this->errors[] =
'Error message';
128 public function doMassActions($parameters, &$object, &$action, $hookmanager)
130 global $conf, $user, $langs;
135 if (in_array($parameters[
'currentcontext'], array(
'somecontext1',
'somecontext2')))
137 foreach ($parameters[
'toselect'] as $objectid)
144 $this->results = array(
'myreturn' => 999);
145 $this->resprints =
'A text to show';
148 $this->errors[] =
'Error message';
165 global $conf, $user, $langs;
171 if (in_array($parameters[
'currentcontext'], array(
'somecontext1',
'somecontext2')))
173 $this->resprints =
'<option value="0"'.($disabled ?
' disabled="disabled"' :
'').
'>'.$langs->trans(
"MyModuleMassAction").
'</option>';
179 $this->errors[] =
'Error message';
198 global $conf, $user, $langs;
201 $outputlangs = $langs;
203 $ret = 0; $deltemp = array();
204 dol_syslog(get_class($this).
'::executeHooks action='.$action);
207 if (in_array($parameters[
'currentcontext'], array(
'somecontext1',
'somecontext2')))
226 global $conf, $user, $langs;
229 $outputlangs = $langs;
231 $ret = 0; $deltemp = array();
232 dol_syslog(get_class($this).
'::executeHooks action='.$action);
235 if (in_array($parameters[
'currentcontext'], array(
'somecontext1',
'somecontext2'))) {
254 global $conf, $user, $langs;
256 $langs->load(
"mymodule@mymodule");
258 $this->results = array();
263 if ($parameters[
'tabfamily'] ==
'mymodule') {
265 $head[$h][1] = $langs->trans(
"Home");
266 $head[$h][2] =
'home';
269 $this->results[
'title'] = $langs->trans(
"MyModule");
270 $this->results[
'picto'] =
'mymodule@mymodule';
273 $head[$h][0] =
'customreports.php?objecttype='.$parameters[
'objecttype'].(empty($parameters[
'tabfamily']) ?
'' :
'&tabfamily='.$parameters[
'tabfamily']);
274 $head[$h][1] = $langs->trans(
"CustomReports");
275 $head[$h][2] =
'customreports';
277 $this->results[
'head'] = $head;
298 if ($parameters[
'features'] ==
'myobject') {
299 if ($user->rights->mymodule->myobject->read) {
300 $this->results[
'result'] = 1;
303 $this->results[
'result'] = 0;
restrictedArea($parameters, &$action, $hookmanager)
Overloading the restrictedArea function : check permission on an object.
loadDataForCustomReports($parameters, &$action, $hookmanager)
Overloading the loadDataForCustomReports function : returns data to complete the customreport tool...
addMoreMassActions($parameters, &$object, &$action, $hookmanager)
Overloading the addMoreMassActions function : replacing the parent's function with the one below...
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
$conf db
API class for accounts.
beforePDFCreation($parameters, &$object, &$action)
Execute action.
doMassActions($parameters, &$object, &$action, $hookmanager)
Overloading the doMassActions function : replacing the parent's function with the one below...
afterPDFCreation($parameters, &$pdfhandler, &$action)
Execute action.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
getNomUrl($parameters, &$object, &$action)
Execute action.
__construct($db)
Constructor.
doActions($parameters, &$object, &$action, $hookmanager)
Overloading the doActions function : replacing the parent's function with the one below...