protected function _getAvailableFiles($moduleName) { $return = array(); if (!$this->isModuleActive()) { return $return; } /** * @var $PDFMaker PDFMaker_PDFMaker_Model */ \Vtiger_Loader::autoLoad('PDFMaker_PDFMaker_Model'); $PDFMaker = new \PDFMaker_PDFMaker_Model(); if (method_exists($PDFMaker, "GetAvailableTemplates")) { $templates = $PDFMaker->GetAvailableTemplates($moduleName); foreach ($templates as $index => $value) { $return[$index] = 'PDFMaker - ' . $value["templatename"]; } } return $return; }