CommonITILTask::genericGetAlreadyPlannedInformation PHP Метод

genericGetAlreadyPlannedInformation() статический публичный Метод

Display a Planning Item
static public genericGetAlreadyPlannedInformation ( $itemtype, array $val ) : Already
$itemtype itemtype
$val array Array of the item to display
Результат Already planned information
    static function genericGetAlreadyPlannedInformation($itemtype, array $val)
    {
        global $CFG_GLPI;
        if ($item = getItemForItemtype($itemtype)) {
            $objectitemtype = $item->getItilObjectItemType();
            //TRANS: %1$s is a type, %2$$ is a date, %3$s is a date
            $out = sprintf(__('%1$s: from %2$s to %3$s:'), $item->getTypeName(1), Html::convDateTime($val["begin"]), Html::convDateTime($val["end"]));
            $out .= "<br><a href='" . Toolbox::getItemTypeFormURL($objectitemtype) . "?id=" . $val[getForeignKeyFieldForItemType($objectitemtype)] . "&amp;forcetab=" . $itemtype . "\$1'>";
            $out .= Html::resume_text($val["name"], 80) . '</a>';
            return $out;
        }
    }

Usage Example

 /**
  * Display a Planning Item
  *
  * @param $val    array of the item to display
  *
  * @return Already planned information
  **/
 static function getAlreadyPlannedInformation($val)
 {
     return parent::genericGetAlreadyPlannedInformation('TicketTask', $val);
 }
All Usage Examples Of CommonITILTask::genericGetAlreadyPlannedInformation