Beispiel #1
0
 static function countForProjetTask(PluginProjetTask $item)
 {
     $types = implode("','", PluginProjetProjet::getTypes());
     if (empty($types)) {
         return 0;
     }
     return countElementsInTable('glpi_plugin_projet_tasks_items', "`itemtype` IN ('{$types}')\n                                   AND `plugin_projet_tasks_id` = '" . $item->getID() . "'");
 }
Beispiel #2
0
function plugin_projet_MassiveActionsDisplay($options = array())
{
    $projet = new PluginProjetProjet();
    if (in_array($options['itemtype'], PluginProjetProjet::getTypes(true))) {
        $projet->dropdownProjet("plugin_projet_projets_id");
        echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"" . _sx('button', 'Post') . "\" >";
    }
    return "";
}
 static function displayTabContentForPDF(PluginPdfSimplePDF $pdf, CommonGLPI $item, $tab)
 {
     if ($item->getType() == 'PluginProjetProjet') {
         self::pdfForProjet($pdf, $item, true);
     } else {
         if (in_array($item->getType(), PluginProjetProjet::getTypes(true))) {
             self::PdfFromItems($pdf, $item);
         } else {
             return false;
         }
     }
     return true;
 }