Метод | Описание | |
---|---|---|
addConfirmationOnAction ( $string, $additionalactions = '' ) : nothing | Add confirmation on button or link before action | |
ajaxFooter ( ) | Display Ajax Footer for debug | |
ajaxForm ( $selector, $success = "console.log(html);" ) | This function provides a mecanism to send html form by ajax | |
autocompletionTextField ( CommonDBTM $item, $field, $options = [] ) : nothing | Show div with auto completion | |
back ( ) : nothing | Redirection to $_SERVER['HTTP_REFERER'] page | |
changeProgressBarMessage ( $msg = " " ) : nothing | Change the Message under the Progress Bar | |
changeProgressBarPosition ( $crt, $tot, $msg = "" ) : nothing | Change the Progress Bar Position | |
checkAllAsCheckbox ( $container_id, $rand = '' ) : nothing | Display "check All as" checkbox | |
clean ( $value, $striptags = true, $keep_bad = 2 ) : clean | Clean display value deleting html tags | |
cleanId ( $id ) : String | Clean ID used for HTML elements | |
cleanInputText ( $string ) : clean | Clean string for input text field | |
cleanParametersURL ( $url ) : clean | Clean all parameters of an URL. Get a clean URL | |
cleanPostForTextArea ( $value ) : clean | Clean post value for display in textarea | |
cleanSQLDisplay ( $request ) | Clean Display of Request | |
closeArrowMassives ( $actions, $confirm = [] ) | show arrow for massives actions : closing | |
closeForm ( $display = true ) : String | Create a close form part including CSRF token | |
computeGenericDateTimeSearch ( $val, $force_day = false, $specifictime = '' ) : computed | Compute date / datetime value resulting of showGenericDateTimeSearch | |
convDate ( $time, $format = null ) | Convert a date YY-MM-DD to DD-MM-YY for calendar | |
convDateTime ( $time, $format = null ) | Convert a date YY-MM-DD HH:MM to DD-MM-YY HH:MM for display in a html table | |
createProgressBar ( $msg = " " ) : nothing | Create a Dynamic Progress Bar | |
css ( $url, $options = [] ) : string | Creates a link element for CSS stylesheets. | |
displayAjaxMessageAfterRedirect ( ) | ||
displayBackLink ( ) | Display a Link to the last page using http_referer if available else use history.back | |
displayDebugInfos ( $with_session = true, $ajax = false ) | Display Debug Information | |
displayErrorAndDie ( $message, $minimal = false ) : nothing | Simple Error message page | |
displayMenuAll ( $menu = [] ) | Display responsive menu | |
displayMessageAfterRedirect ( ) | Display a div containing messages set in session in the previous page | |
displayNotFoundError ( ) : Nothing | Display common message for item not found | |
displayProgressBar ( $width, $percent, $options = [] ) : nothing | Display a simple progress bar | |
displayRightError ( ) : Nothing | Display common message for privileges errors | |
displayTitle ( $ref_pic_link = "", $ref_pic_text = "", $ref_title = "", $ref_btts = "" ) : nothing | Common Title Function | |
entities_deep ( $value ) : array | Recursivly execute htmlentities on an Array | |
entity_decode_deep ( $value ) : array | Recursivly execute html_entity_decode on an Array | |
file ( $options = [] ) : string | Creates an input file field. Send file names in _$name field as array. | |
fileScript ( $options = [] ) : nothing | fileScript : file upload script | |
footer ( $keepDB = false ) | Print footer for every page | |
formatAttribute ( $key, $value ) : string | Formats an individual attribute, and returns the string value of the composed attribute. | |
formatNumber ( $number, $edit = false, $forcedecimal ) : formatted | Convert a number to correct display | |
generateImageName ( ) : string | ||
getCheckAllAsCheckbox ( $container_id, $rand = '' ) : Get | Get "check All as" checkbox | |
getCheckbox ( array $options ) : the | Get a checkbox. | |
getConfirmationOnActionScript ( $string, $additionalactions = '' ) : confirmation | Get confirmation on button or link before action | |
getCopyrightMessage ( ) : text | Get copyright message as HTML (used in footers) | |
getCriterionForMassiveCheckboxes ( array $options ) : the | Get the jquery criterion for massive checkbox update We can filter checkboxes by a container or by a tag. We can also select checkboxes that have a given tag and that are contained inside a container | |
getGenericDateTimeSearchItems ( $options ) : array | Get items to display for showGenericDateTimeSearch | |
getMassiveActionCheckBox ( $itemtype, $id, array $options = [] ) : get | Get the massive action checkbox | |
getMenuInfos ( ) : string | ||
getOpenMassiveActionsForm ( $name = '' ) : open | Get open form for massive action string | |
getSimpleForm ( $action, $btname, $btlabel, array $fields = [], $btimage = '', $btoption = '', $confirm = '' ) | create a minimal form for simple action | |
glpi_flush ( ) | Flush the current displayed items (do not works really fine) | |
header ( $title, $url = '', $sector = "none", $item = "none", $option = "" ) | Print a nice HTML head for every page | |
header_nocache ( ) | Set page not to use the cache | |
helpFooter ( ) | Print footer for help page | |
helpHeader ( $title, $url = '' ) | Print a nice HTML head for help page | |
hidden ( $fieldName, $options = [] ) : string | Creates a hidden input field. | |
image ( $path, $options = [] ) : string | Creates a formatted IMG element. | |
imagePaste ( $options = [] ) : nothing | imagePaste : Show image paste for an item, with TinyMce | |
includeHeader ( $title = '' ) : nothing | Include common HTML headers | |
initEditorSystem ( $name, $rand = '', $display = true ) : nothing | Init the Editor System to a textarea | |
initImagePasteSystem ( $name, $rand ) : nothing | Init the Image paste System for tiny mce | |
input ( $fieldName, $options = [] ) : string | Creates a text input field. | |
jsAdaptDropdown ( $id, $params = [] ) : String | Adapt dropdown to clean JS | |
jsAjaxDropdown ( $name, $field_id, $url, $params = [] ) : String | Create Ajax dropdown to clean JS | |
jsAlertCallback ( $msg, $title, $okCallback = null ) | Summary of jsAlertCallback Is a replacement for Javascript native alert function Beware that native alert is synchronous by nature (will block browser waiting an answer from user, but that this is emulating the alert behaviour by using a callback function when user presses 'Ok' button. | |
jsConfirmCallback ( $msg, $title, $yesCallback = null, $noCallback = null ) | Summary of confirmCallback Is a replacement for Javascript native confirm function Beware that native confirm is synchronous by nature (will block browser waiting an answer from user, but that this is emulating the confirm behaviour by using callbacks functions when user presses 'Yes' or 'No' buttons. | |
jsDisable ( $id ) : String | Get javascript code for disable an item | |
jsEnable ( $id ) : String | Get javascript code for enable an item | |
jsGetDropdownValue ( $id ) : string | Get item value | |
jsGetElementbyID ( $id ) : String | Get javascript code to get item by id | |
jsHide ( $id ) : String | Get javascript code for hide an item | |
jsSetDropdownValue ( $id, $value ) : string | Set dropdown value | |
jsShow ( $id ) : String | Get javascript code for hide an item | |
link ( $text, $url, $options = [] ) : string | Creates an HTML link. | |
makeTitle ( $string, $num, $tot ) : String | Create a title for list, as "List (5 on 35)" | |
nl2br_deep ( $value ) : array | Recursivly execute nl2br on an Array | |
nullFooter ( ) | Print footer for null page | |
nullHeader ( $title, $url = '' ) | Print a nice HTML head with no controls | |
openArrowMassives ( $formname, $fixed = false, $ontop = false, $onright = false ) | show arrow for massives actions : opening | |
openMassiveActionsForm ( $name = '' ) : nothing | Display open form for massive action | |
parseAttributes ( $options = [] ) : string | Returns a space-delimited string with items of the $options array. | |
popFooter ( ) | Print footer for a modal window | |
popHeader ( $title, $url = '', $iframed = false ) | Print a nice HTML head for modal window (nothing to display) | |
printAjaxPager ( $title, $start, $numrows, $additional_info = '' ) : nothing | Print Ajax pager for list in tab panel | |
printCleanArray ( $tab, $pad, $jsexpand = false ) : nothing | Clean Printing of and array in a table ONLY FOR DEBUG | |
printPager ( $start, $numrows, $target, $parameters, $item_type_output, $item_type_output_param, $additional_info = '' ) : nothing | Print pager for search option (first/previous/next/last) | |
printPagerForm ( $action = "" ) : nothing | Display the list_limit combo choice | |
progressBar ( $id, array $options = [] ) : nothing | Manage progresse bars | |
redefineAlert ( ) | In this function, we redefine 'window.alert' javascript function by a jquery-ui dialog equivalent (but prettier). | |
redefineConfirm ( ) | In this function, we redefine 'window.confirm' javascript function by a jquery-ui dialog equivalent (but prettier). | |
redirect ( $dest ) : nothing | Redirection hack | |
redirectToLogin ( $params = '' ) : nothing | Redirection to Login page | |
resume_name ( $string, $length = 255 ) : cut | Resume a name for display | |
resume_text ( $string, $length = 255 ) : cut | Resume text for followup | |
script ( $url ) : String | Returns one or many script tags depending on the number of scripts given. | |
scriptBlock ( $script ) : string | Wrap $script in a script tag. | |
scriptEnd ( ) : mixed | End a Buffered section of Javascript capturing. | |
scriptStart ( ) | Begin a script block that captures output until HtmlHelper::scriptEnd() is called. This capturing block will capture all output between the methods and create a scriptBlock from it. | |
showCheckbox ( array $options = [] ) : nothing | ||
showCheckboxMatrix ( array $columns, array $rows, array $options = [] ) : random | Display choice matrix | |
showColorField ( $name, $options = [] ) | Display Color field | |
showDateField ( $name, $options = [] ) : rand | Display Date form with calendar | |
showDateFormItem ( $element, $value = '', $maybeempty = true, $can_edit = true, $minDate = '', $maxDate = '', $displayYear = true ) : rand | Display Date form with calendar | |
showDateTimeField ( $name, $options = [] ) : rand | Display DateTime form with calendar | |
showDateTimeFormItem ( $element, $value = '', $time_step, $maybeempty = true, $can_edit = true, $minDate = '', $maxDate = '', $minTime = '', $maxTime = '' ) : rand | Display DateTime form with calendar | |
showGenericDateTimeSearch ( $element, $value = '', $options = [] ) : rand | Show generic date search | |
showMassiveActionCheckBox ( $itemtype, $id, array $options = [] ) : show | Show the massive action checkbox | |
showMassiveActions ( $options = [] ) : nothing | Display massive actions | |
showProfileSelecter ( $target ) : nothing | Print the form used to select profile if several are available | |
showSimpleForm ( $action, $btname, $btlabel, array $fields = [], $btimage = '', $btoption = '', $confirm = '' ) | create a minimal form for simple action | |
showToolTip ( $content, $options = [] ) : nothing | Show a tooltip on an item | |
simpleHeader ( $title, $links = [] ) | Print a simple HTML head with links | |
submit ( $caption, $options = [] ) : string | Creates a submit button element. This method will generate input elements that can be used to submit, and reset forms by using $options. Image submits can be created by supplying an image option | |
timestampToString ( $time, $display_sec = true, $use_days = true ) : string | Make a good string from the unix timestamp $sec | |
weblink_extract ( $value ) : clean | Extract url from web link |
static public addConfirmationOnAction ( $string, $additionalactions = '' ) : nothing | ||
$string | string to display or array of string for using multilines | |
$additionalactions | string additional actions to do on success confirmation (default '') | |
Результат | nothing |
static public ajaxForm ( $selector, $success = "console.log(html);" ) |
static public autocompletionTextField ( CommonDBTM $item, $field, $options = [] ) : nothing | ||
$item | CommonDBTM | item object used for create dropdown |
$field | field to search for autocompletion | |
$options | array of possible options: - name : string / name of the select (default is field parameter) - value : integer / preselected value (default value of the item object) - size : integer / size of the text field - entity : integer / restrict to a defined entity (default entity of the object if define) set to -1 not to take into account - user : integer / restrict to a defined user (default -1 : no restriction) - option : string / options to add to text field - display : boolean / if false get string | |
Результат | nothing | (print out an HTML div) |
static public back ( ) : nothing | ||
Результат | nothing |
static public changeProgressBarMessage ( $msg = " " ) : nothing | ||
$msg | message under the bar (default ' ') | |
Результат | nothing |
static public changeProgressBarPosition ( $crt, $tot, $msg = "" ) : nothing | ||
$crt | Current Value (less then $max) | |
$tot | Maximum Value | |
$msg | message inside the bar (default is %) (default '') | |
Результат | nothing |
static public checkAllAsCheckbox ( $container_id, $rand = '' ) : nothing | ||
$container_id | string html of the container of checkboxes link to this check all checkbox | |
$rand | string rand value to use (default is auto generated) (default '')) | |
Результат | nothing | / display item |
static public clean ( $value, $striptags = true, $keep_bad = 2 ) : clean | ||
$value | string: string value | |
$striptags | bool: strip all html tags | |
$keep_bad | int: 1 : neutralize tag anb content, 2 : remove tag and neutralize content | |
Результат | clean | value |
static public cleanId ( $id ) : String | ||
$id | string id of the dom element | |
Результат | String |
static public cleanInputText ( $string ) : clean | ||
$string | string: input text | |
Результат | clean | string |
static public cleanParametersURL ( $url ) : clean | ||
$url | string URL | |
Результат | clean | URL |
static public cleanPostForTextArea ( $value ) : clean | ||
$value | string: string value | |
Результат | clean | value |
static public cleanSQLDisplay ( $request ) | ||
$request | SQL request |
static public closeArrowMassives ( $actions, $confirm = [] ) | ||
$actions | array of action : $name -> $label | |
$confirm | array of confirmation string (optional) \deprecated since 0.84 |
static public closeForm ( $display = true ) : String | ||
$display | boolean Display or return string (default true) | |
Результат | String |
static public computeGenericDateTimeSearch ( $val, $force_day = false, $specifictime = '' ) : computed | ||
$val | date / datetime value passed | |
$force_day | boolean force computation in days (false by default) | |
$specifictime | timestamp set specific timestamp (default '') | |
Результат | computed | date / datetime value |
static public convDate ( $time, $format = null ) | ||
$time | date date to convert | |
$format | (default null) |
static public convDateTime ( $time, $format = null ) | ||
$time | datetime datetime to convert @param $format (default null) |
static public createProgressBar ( $msg = " " ) : nothing | ||
$msg | initial message (under the bar) (default ' ') | |
Результат | nothing |
static public displayAjaxMessageAfterRedirect ( ) |
static public displayBackLink ( ) |
static public displayDebugInfos ( $with_session = true, $ajax = false ) | ||
$with_session | with session information (true by default) |
static public displayErrorAndDie ( $message, $minimal = false ) : nothing | ||
$message | string displayed before dying | |
$minimal | set to true do not display app menu (false by default) | |
Результат | nothing | as function kill script |
static public displayMenuAll ( $menu = [] ) | ||
$menu | array of menu items - key : plugin system name - value : array of options * id : html id attribute * default : defaul url * title : displayed label * content : menu sub items, array with theses options : - page : url - title : displayed label - shortcut : keyboard shortcut letter |
static public displayMessageAfterRedirect ( ) |
static public displayNotFoundError ( ) : Nothing | ||
Результат | Nothing |
static public displayProgressBar ( $width, $percent, $options = [] ) : nothing | ||
$width | Width of the progress bar | |
$percent | Percent of the progress bar | |
$options | array of possible options: - title : string title to display (default Progesssion) - simple : display a simple progress bar (no title / only percent) - forcepadding : boolean force str_pad to force refresh (default true) | |
Результат | nothing |
static public displayRightError ( ) : Nothing | ||
Результат | Nothing | (die) |
static public displayTitle ( $ref_pic_link = "", $ref_pic_text = "", $ref_title = "", $ref_btts = "" ) : nothing | ||
$ref_pic_link | Path to the image to display (default '') | |
$ref_pic_text | Alt text of the icon (default '') | |
$ref_title | Title to display (default '') | |
$ref_btts | Extra items to display array(link=>text...) (default '') | |
Результат | nothing |
static public entities_deep ( $value ) : array | ||
$value | string or array | |
Результат | array | of value (same struct as input) |
static public entity_decode_deep ( $value ) : array | ||
$value | string or array | |
Результат | array | of value (same struct as input) |
static public file ( $options = [] ) : string | ||
$options | array of options - name string field name (default filename) - multiple boolean allow multiple file upload (default false) - onlyimages boolean restrict to image files (default false) - showfilecontainer string DOM ID of the container showing file uploaded: use selector to display - showfilesize boolean show file size with file name - rand string already computed rand value - pasteZone string DOM ID of the paste zone - dropZone string DOM ID of the drop zone | |
Результат | string | input file field |
static public fileScript ( $options = [] ) : nothing | ||
$options | array of possible options: - imagePaste boolean image paste with tinyMce - name string field name (default filename) - multiple boolean allow multiple file upload (default false) - onlyimages boolean restrict to image files (default false) - showfilecontainer string DOM ID of the container showing file uploaded: use selector to display - pasteZone string DOM ID of the paste zone - dropZone string DOM ID of the drop zone - rand string already computed rand value | |
Результат | nothing | (print the image paste) |
static public formatAttribute ( $key, $value ) : string | ||
$key | The name of the attribute to create | |
$value | The value of the attribute to create. | |
Результат | string | The composed attribute. |
static public formatNumber ( $number, $edit = false, $forcedecimal ) : formatted | ||
$number | float Number to display | |
$edit | boolean display number for edition ? (id edit use . in all case) (false by default) | |
$forcedecimal | integer Force decimal number (do not use default value) (default -1) | |
Результат | formatted | number |
static public generateImageName ( ) : string | ||
Результат | string |
static public getCheckAllAsCheckbox ( $container_id, $rand = '' ) : Get | ||
$container_id | string html of the container of checkboxes link to this check all checkbox | |
$rand | string rand value to use (default is auto generated)(default '') | |
Результат | Get | checkbox string |
static public getCheckbox ( array $options ) : the | ||
$options | array | array of parameters: - title its title - name its name - id its id - value the value to set when checked - readonly can we edit it ? - massive_tags the tag to set for massive checkbox update - checked is it checked or not ? - zero_on_empty do we send 0 on submit when it is not checked ? - specific_tags HTML5 tags to add - criterion the criterion for massive checkbox |
Результат | the | HTML code for the checkbox |
static public getConfirmationOnActionScript ( $string, $additionalactions = '' ) : confirmation | ||
$string | string to display or array of string for using multilines | |
$additionalactions | string additional actions to do on success confirmation (default '') | |
Результат | confirmation | script |
static public getCopyrightMessage ( ) : text | ||
Результат | text |
static public getCriterionForMassiveCheckboxes ( array $options ) : the | ||
$options | array | array of parameters: - tag_for_massive tag of the checkboxes to update - container_id if of the container of the checkboxes |
Результат | the | javascript code for jquery criterion or empty string if it is not a massive update checkbox |
static public getGenericDateTimeSearchItems ( $options ) : array | ||
$options | array of possible options: - with_time display with time selection ? (default false) - with_future display with future date selection ? (default false) - with_days display specific days selection TODAY, BEGINMONTH, LASTMONDAY... ? (default true) | |
Результат | array | of posible values |
static public getMassiveActionCheckBox ( $itemtype, $id, array $options = [] ) : get | ||
$itemtype | Massive action itemtype | |
$id | ID of the item | |
$options | array | array |
Результат | get | checkbox |
static public getOpenMassiveActionsForm ( $name = '' ) : open | ||
$name | given name/id to the form (default '') | |
Результат | open | form string |
static public getSimpleForm ( $action, $btname, $btlabel, array $fields = [], $btimage = '', $btoption = '', $confirm = '' ) | ||
$action | String URL to call on submit | |
$btname | String button name (maybe if name <> value) | |
$btlabel | String button label | |
$fields | array | Array field name => field value |
$btimage | String button image uri (optional) (default '') | |
$btoption | String optional button option (default '') | |
$confirm | String optional confirm message (default '') |
static public glpi_flush ( ) |
static public header ( $title, $url = '', $sector = "none", $item = "none", $option = "" ) | ||
$title | title of the page | |
$url | not used anymore (default '') | |
$sector | sector in which the page displayed is (default 'none') | |
$item | item corresponding to the page displayed (default 'none') | |
$option | option corresponding to the page displayed (default '') |
static public header_nocache ( ) |
static public helpHeader ( $title, $url = '' ) | ||
$title | title of the page | |
$url | not used anymore (default '') |
static public imagePaste ( $options = [] ) : nothing | ||
$options | array of options - name string field name (default filename) - multiple boolean allow multiple file upload (default false - onlyimages boolean restrict to image files (default false) - showfilecontainer string DOM ID of the container showing file uploaded: use selector to display - imagePaste boolean image paste with tinyMce - dropZone string DOM ID of the drop zone - rand string already computed rand value - pasteZone string DOM ID of the paste zone | |
Результат | nothing | (print the image paste) |
static public includeHeader ( $title = '' ) : nothing | ||
$title | title used for the page (default '') | |
Результат | nothing |
static public initEditorSystem ( $name, $rand = '', $display = true ) : nothing | ||
$name | name of the html textarea to use | |
$rand | rand of the html textarea to use (if empty no image paste system)(default '') | |
$display | boolean display or get js script (true by default) | |
Результат | nothing |
static public initImagePasteSystem ( $name, $rand ) : nothing | ||
$name | name of the html textarea to use | |
$rand | rand of the html textarea to use | |
Результат | nothing |
static public jsAdaptDropdown ( $id, $params = [] ) : String | ||
$id | string id of the dom element | |
$params | array of parameters | |
Результат | String |
static public jsAjaxDropdown ( $name, $field_id, $url, $params = [] ) : String | ||
$name | ||
$field_id | string id of the dom element | |
$url | string URL to get datas | |
$params | array of parameters must contains : - 'value' : default value selected - 'valuename' : default name of selected value | |
Результат | String |
static public jsAlertCallback ( $msg, $title, $okCallback = null ) | ||
$msg | string message to be shown | |
$title | string title for dialog box | |
$okCallback | string function that will be called when 'Ok' is pressed (default null) |
static public jsConfirmCallback ( $msg, $title, $yesCallback = null, $noCallback = null ) | ||
$msg | string message to be shown | |
$title | string title for dialog box | |
$yesCallback | string function that will be called when 'Yes' is pressed (default null) | |
$noCallback | string function that will be called when 'No' is pressed (default null) |
static public jsDisable ( $id ) : String | ||
$id | string id of the dom element | |
Результат | String |
static public jsEnable ( $id ) : String | ||
$id | string id of the dom element | |
Результат | String |
static public jsGetDropdownValue ( $id ) : string | ||
$id | string id of the dom element | |
Результат | string |
static public jsGetElementbyID ( $id ) : String | ||
$id | string id of the dom element | |
Результат | String |
static public jsHide ( $id ) : String | ||
$id | string id of the dom element | |
Результат | String |
static public jsSetDropdownValue ( $id, $value ) : string | ||
$id | string id of the dom element | |
$value | string value to set | |
Результат | string |
static public jsShow ( $id ) : String | ||
$id | string id of the dom element | |
Результат | String |
static public makeTitle ( $string, $num, $tot ) : String | ||
$string | String text for title | |
$num | Integer number of item displayed | |
$tot | Integer number of item existing | |
Результат | String |
static public nl2br_deep ( $value ) : array | ||
$value | string or array | |
Результат | array | of value (same struct as input) |
static public nullHeader ( $title, $url = '' ) | ||
$title | title of the page | |
$url | not used anymore (default '') |
static public openArrowMassives ( $formname, $fixed = false, $ontop = false, $onright = false ) | ||
$formname | string | |
$fixed | boolean used tab_cadre_fixe in both tables (false by default) | |
$ontop | display on top of the list (false by default) | |
$onright | display on right of the list (false by default) \deprecated since 0.84 |
static public openMassiveActionsForm ( $name = '' ) : nothing | ||
$name | given name/id to the form (default '') | |
Результат | nothing | / display item |
static public parseAttributes ( $options = [] ) : string | ||
$options | Array of options. | |
Результат | string | Composed attributes. |
static public popHeader ( $title, $url = '', $iframed = false ) | ||
$title | title of the page | |
$url | not used anymore (default '') | |
$iframed | indicate if page loaded in iframe - css target (default false) |
static public printAjaxPager ( $title, $start, $numrows, $additional_info = '' ) : nothing | ||
$title | displayed above | |
$start | from witch item we start | |
$numrows | total items | |
$additional_info | Additional information to display (default '') | |
Результат | nothing | (print a pager) |
static public printCleanArray ( $tab, $pad, $jsexpand = false ) : nothing | ||
$tab | the array to display | |
$pad | Pad used (default 0) | |
$jsexpand | Expand using JS ? (default false) | |
Результат | nothing |
static public printPager ( $start, $numrows, $target, $parameters, $item_type_output, $item_type_output_param, $additional_info = '' ) : nothing | ||
$start | from witch item we start | |
$numrows | total items | |
$target | page would be open when click on the option (last,previous etc) | |
$parameters | parameters would be passed on the URL. | |
$item_type_output | item type display - if >0 display export PDF et Sylk form (default 0) | |
$item_type_output_param | item type parameter for export (default 0) | |
$additional_info | Additional information to display (default '') | |
Результат | nothing | (print a pager) |
static public printPagerForm ( $action = "" ) : nothing | ||
$action | page would be posted when change the value (URL + param) (default '') ajax Pager will be displayed if empty | |
Результат | nothing | (print a combo) |
static public progressBar ( $id, array $options = [] ) : nothing | ||
$id | HTML ID of the progress bar | |
$options | array | array progress status - create do we have to create it ? - message add or change the message - percent current level |
Результат | nothing | (display) |
static public redefineAlert ( ) |
static public redefineConfirm ( ) |
static public redirect ( $dest ) : nothing | ||
$dest | string: Redirection destination | |
Результат | nothing |
static public redirectToLogin ( $params = '' ) : nothing | ||
$params | param to add to URL (default '') | |
Результат | nothing |
static public resume_name ( $string, $length = 255 ) : cut | ||
$string | string string to resume | |
$length | integer resume length (default 255) | |
Результат | cut | string |
static public resume_text ( $string, $length = 255 ) : cut | ||
$string | string string to resume | |
$length | integer resume length (default 255) | |
Результат | cut | string |
static public script ( $url ) : String | ||
$url | String of javascript file to include | |
Результат | String | of script tags |
static public scriptBlock ( $script ) : string | ||
$script | The script to wrap | |
Результат | string |
static public scriptStart ( ) |
static public showCheckbox ( array $options = [] ) : nothing | ||
$options | array | array |
Результат | nothing | (display only) |
static public showCheckboxMatrix ( array $columns, array $rows, array $options = [] ) : random | ||
$columns | array | array of column field name => column label |
$rows | array | array of field name => array( 'label' the label of the row 'columns' an array of specific information regaring current row and given column indexed by column field_name * a string if only have to display a string * an array('value' => ???, 'readonly' => ???) that is used to Dropdown::showYesNo() |
$options | array | array possible: 'title' of the matrix 'first_cell' the content of the upper-left cell 'row_check_all' set to true to display a checkbox to check all elements of the row 'col_check_all' set to true to display a checkbox to check all elements of the col 'rand' random number to use for ids |
Результат | random | value used to generate the ids |
static public showColorField ( $name, $options = [] ) | ||
$name | name of the element | |
$options | array of possible options: - value : default value to display (default '') - display : boolean display or get string (default true) - rand : specific random value (default generated one) |
static public showDateField ( $name, $options = [] ) : rand | ||
$name | name of the element | |
$options | array of possible options: - value : default value to display (default '') - maybeempty : may be empty ? (true by default) - canedit : could not modify element (true by default) - min : minimum allowed date (default '') - max : maximum allowed date (default '') - showyear : should we set/diplay the year? (true by default) - display : boolean display of return string (default true) - rand : specific rand value (default generated one) - yearrange : set a year range to show in drop-down (default '') | |
Результат | rand | value used if displayes else string |
static public showDateFormItem ( $element, $value = '', $maybeempty = true, $can_edit = true, $minDate = '', $maxDate = '', $displayYear = true ) : rand | ||
$element | name of the element | |
$value | default value to display (default '') | |
$maybeempty | may be empty ? (true by default) | |
$can_edit | could not modify element (true by default) | |
$minDate | minimum allowed date (default '') | |
$maxDate | maximum allowed date (default '') | |
$displayYear | should we set/diplay the year? (true by default) | |
Результат | rand | value used \deprecated since 0.84 used Html::showDateField instead |
static public showDateTimeField ( $name, $options = [] ) : rand | ||
$name | name of the element | |
$options | array of possible options: - value : default value to display (default '') - timestep : step for time in minute (-1 use default config) (default -1) - maybeempty : may be empty ? (true by default) - canedit : could not modify element (true by default) - mindate : minimum allowed date (default '') - maxdate : maximum allowed date (default '') - mintime : minimum allowed time (default '') - maxtime : maximum allowed time (default '') - showyear : should we set/diplay the year? (true by default) - display : boolean display or get string (default true) - rand : specific random value (default generated one) | |
Результат | rand | value used if displayes else string |
static public showDateTimeFormItem ( $element, $value = '', $time_step, $maybeempty = true, $can_edit = true, $minDate = '', $maxDate = '', $minTime = '', $maxTime = '' ) : rand | ||
$element | name of the element | |
$value | default value to display (default '') | |
$time_step | step for time in minute (-1 use default config) (default -1) | |
$maybeempty | may be empty ? (true by default) | |
$can_edit | could not modify element (true by default) | |
$minDate | minimum allowed date (default '') | |
$maxDate | maximum allowed date (default '') | |
$minTime | minimum allowed time (default '') | |
$maxTime | maximum allowed time (default '') | |
Результат | rand | value used \deprecated since 0.84 used Html::showDateTimeField instead |
static public showGenericDateTimeSearch ( $element, $value = '', $options = [] ) : rand | ||
$element | name of the html element | |
$value | default value (default '') | |
$options | array of possible options: - with_time display with time selection ? (default false) - with_future display with future date selection ? (default false) - with_days display specific days selection TODAY, BEGINMONTH, LASTMONDAY... ? (default true) | |
Результат | rand | value of dropdown |
static public showMassiveActionCheckBox ( $itemtype, $id, array $options = [] ) : show | ||
$itemtype | Massive action itemtype | |
$id | ID of the item | |
$options | array | array |
Результат | show | checkbox |
static public showMassiveActions ( $options = [] ) : nothing | ||
$options | array of parameters must contains : - container : DOM ID of the container of the item checkboxes (since version 0.85) may contains : - num_displayed : integer number of displayed items. Permit to check suhosin limit. (default -1 not to check) - ontop : boolean true if displayed on top (default true) - fixed : boolean true if used with fixed table display (default true) - forcecreate : boolean force creation of modal window (default = false). Modal is automatically created when displayed the ontop item. If only a bottom one is displayed use it - check_itemtype : string alternate itemtype to check right if different from main itemtype (default empty) - check_items_id : integer ID of the alternate item used to check right / optional (default empty) - is_deleted : boolean is massive actions for deleted items ? - extraparams : string extra URL parameters to pass to massive actions (default empty) if ([extraparams]['hidden'] is set : add hidden fields to post) - specific_actions : array of specific actions (do not use standard one) - add_actions : array of actions to add (do not use standard one) - confirm : string of confirm message before massive action - item : CommonDBTM object that has to be passed to the actions - tag_to_send : the tag of the elements to send to the ajax window (default: common) | |
Результат | nothing |
static public showProfileSelecter ( $target ) : nothing | ||
$target | target of the form | |
Результат | nothing |
static public showSimpleForm ( $action, $btname, $btlabel, array $fields = [], $btimage = '', $btoption = '', $confirm = '' ) | ||
$action | String URL to call on submit | |
$btname | String button name | |
$btlabel | String button label | |
$fields | array | Array field name => field value |
$btimage | String button image uri (optional) (default '') | |
$btoption | String optional button option (default '') | |
$confirm | String optional confirm message (default '') |
static public showToolTip ( $content, $options = [] ) : nothing | ||
$content | string data to put in the tooltip | |
$options | array of possible options: - applyto : string / id of the item to apply tooltip (default empty). If not set display an icon - title : string / title to display (default empty) - contentid : string / id for the content html container (default auto generated) (used for ajax) - link : string / link to put on displayed image if contentid is empty - linkid : string / html id to put to the link link (used for ajax) - linktarget : string / target for the link - popup : string / popup action : link not needed to use it - img : string / url of a specific img to use - display : boolean / display the item : false return the datas - autoclose : boolean / autoclose the item : default true (false permit to scroll) | |
Результат | nothing | (print out an HTML div) |
static public simpleHeader ( $title, $links = [] ) | ||
$title | title of the page | |
$links | array of links to display |
static public timestampToString ( $time, $display_sec = true, $use_days = true ) : string | ||
$time | integer timestamp | |
$display_sec | boolean display seconds ? (true by default) | |
$use_days | boolean use days for display ? (true by default) | |
Результат | string |
static public weblink_extract ( $value ) : clean | ||
$value | string value | |
Результат | clean | value |