Skip to content

Commit

Permalink
Qual: Add abstract write_file to ModelePDFRecruitmentCandidature
Browse files Browse the repository at this point in the history
And update phpdoc for derived classes
  • Loading branch information
mdeweerd committed Oct 14, 2024
1 parent 5f5df2f commit 26aa2ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/recruitment/admin/setup_candidatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@

$module = new $classname($db);

'@phan-var-force ModelePDFRecruitmentCandidature $module';

if ($module->write_file($tmpobject, $langs) > 0) {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ public static function liste_modeles($db, $maxfilenamelength = 0)

return $list;
}


// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
* @param RecruitmentCandidature $object Object source to build document
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param int<0,1> $hidedetails Do not show line details
* @param int<0,1> $hidedesc Do not show desc
* @param int<0,1> $hideref Do not show ref
* @return int<-1,1> 1 if OK, <=0 if KO
*/
abstract public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0);
// phpcs:enable
}


Expand Down

0 comments on commit 26aa2ed

Please sign in to comment.