static function displayTabContentForPDF(PluginPdfSimplePDF $pdf, CommonGLPI $item, $tab) { $tree = isset($_REQUEST['item']['_tree']); $user = isset($_REQUEST['item']['_user']); switch ($tab) { case 'Group$1': self::pdfItems($pdf, $item, false, $tree, $user); break; case 'Group$2': self::pdfItems($pdf, $item, true, $tree, $user); break; case 'Group$3': self::pdfLdapForm($pdf, $item); break; case 'Group$4': self::pdfChildren($pdf, $item); break; case 'Group_User$1': PluginPdfGroup_User::pdfForGroup($pdf, $item, $tree); break; case 'Ticket$1': PluginPdfTicket::pdfForItem($pdf, $item, $tree); break; // Igone tabs which are export options // Igone tabs which are export options case '_tree': case '_user': break; default: return false; } return true; }
/** * export Tab content - classic content use by various object * * @since version 0.83 * * @param $pdf PluginPdfSimplePDF object for output * @param $item CommonGLPI object for which the tab need to be displayed * @param $tab string tab number * * @return true if display done (else will search for another handler) **/ static final function displayCommonTabForPDF(PluginPdfSimplePDF $pdf, CommonGLPI $item, $tab) { switch ($tab) { case '_main_': static::pdfMain($pdf, $item); break; case 'Note': self::pdfNote($pdf, $item); break; case 'Document$1': PluginPdfDocument::pdfForItem($pdf, $item); break; case 'NetworkPort$1': PluginPdfNetworkPort::pdfForItem($pdf, $item); break; case 'Infocom$1': PluginPdfInfocom::pdfForItem($pdf, $item); break; case 'Contract_Item$1': PluginPdfContract_Item::pdfForItem($pdf, $item); break; case 'Ticket$1': PluginPdfTicket::pdfForItem($pdf, $item); break; case 'Link$1': PluginPdfLink::pdfForItem($pdf, $item); break; case 'Reservation$1': PluginPdfReservation::pdfForItem($pdf, $item); break; case 'Log$1': PluginPdfLog::pdfForItem($pdf, $item); break; default: return false; } return true; }