Skip to content

Commit

Permalink
Evarisk#3942 [PreventionPlan] add: comment hook overload
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-francois committed Jul 10, 2024
1 parent 4275623 commit dc03add
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion class/actions_digiriskdolibarr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,14 @@ public function addMoreActionsButtons($parameters, &$object, &$action)

}

/**
* Overloading the showLinkedObjectBlock function : replacing the parent's function with the one below
*
* @param array $parameters Hook metadata (context, etc...)
* @param object $object The object to process
* @return int 0 < on error, 0 on success, 1 to replace standard code
* @throws Exception
*/
public function showLinkedObjectBlock($parameters, &$object) {
global $conf, $langs;

Expand Down Expand Up @@ -1175,6 +1183,6 @@ public function showLinkedObjectBlock($parameters, &$object) {
return 1;
}

return 0;
return 0; // or return 1 to replace standard code
}
}

0 comments on commit dc03add

Please sign in to comment.