PHP 클래스 Html, glpi

파일 보기 프로젝트 열기: glpi-project/glpi 1 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

addConfirmationOnAction() 정적인 공개 메소드

Add confirmation on button or link before action
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

ajaxFooter() 정적인 공개 메소드

Display Ajax Footer for debug
static public ajaxFooter ( )

ajaxForm() 정적인 공개 메소드

This function provides a mecanism to send html form by ajax
static public ajaxForm ( $selector, $success = "console.log(html);" )

autocompletionTextField() 정적인 공개 메소드

Show div with auto completion
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)

back() 정적인 공개 메소드

Redirection to $_SERVER['HTTP_REFERER'] page
static public back ( ) : nothing
리턴 nothing

changeProgressBarMessage() 정적인 공개 메소드

Change the Message under the Progress Bar
static public changeProgressBarMessage ( $msg = " " ) : nothing
$msg message under the bar (default ' ')
리턴 nothing

changeProgressBarPosition() 정적인 공개 메소드

Change the Progress Bar Position
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

checkAllAsCheckbox() 정적인 공개 메소드

Display "check All as" checkbox
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

clean() 정적인 공개 메소드

Clean display value deleting html tags
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

cleanId() 정적인 공개 메소드

Clean ID used for HTML elements
static public cleanId ( $id ) : String
$id string id of the dom element
리턴 String

cleanInputText() 정적인 공개 메소드

Clean string for input text field
static public cleanInputText ( $string ) : clean
$string string: input text
리턴 clean string

cleanParametersURL() 정적인 공개 메소드

Clean all parameters of an URL. Get a clean URL
static public cleanParametersURL ( $url ) : clean
$url string URL
리턴 clean URL

cleanPostForTextArea() 정적인 공개 메소드

Clean post value for display in textarea
static public cleanPostForTextArea ( $value ) : clean
$value string: string value
리턴 clean value

cleanSQLDisplay() 정적인 공개 메소드

Clean Display of Request
static public cleanSQLDisplay ( $request )
$request SQL request

closeArrowMassives() 정적인 공개 메소드

show arrow for massives actions : closing
static public closeArrowMassives ( $actions, $confirm = [] )
$actions array of action : $name -> $label
$confirm array of confirmation string (optional) \deprecated since 0.84

closeForm() 정적인 공개 메소드

Create a close form part including CSRF token
static public closeForm ( $display = true ) : String
$display boolean Display or return string (default true)
리턴 String

computeGenericDateTimeSearch() 정적인 공개 메소드

Compute date / datetime value resulting of showGenericDateTimeSearch
또한 보기: showGenericDateTimeSearch
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

convDate() 정적인 공개 메소드

Convert a date YY-MM-DD to DD-MM-YY for calendar
static public convDate ( $time, $format = null )
$time date date to convert
$format (default null)

convDateTime() 정적인 공개 메소드

Convert a date YY-MM-DD HH:MM to DD-MM-YY HH:MM for display in a html table
static public convDateTime ( $time, $format = null )
$time datetime datetime to convert @param $format (default null)

createProgressBar() 정적인 공개 메소드

Create a Dynamic Progress Bar
static public createProgressBar ( $msg = " " ) : nothing
$msg initial message (under the bar) (default ' ')
리턴 nothing

css() 정적인 공개 메소드

Creates a link element for CSS stylesheets.
static public css ( $url, $options = [] ) : string
$url String of javascript file to include
$options Array of HTML attributes.
리턴 string CSS link tag

displayAjaxMessageAfterRedirect() 정적인 공개 메소드

displayDebugInfos() 정적인 공개 메소드

Display Debug Information
static public displayDebugInfos ( $with_session = true, $ajax = false )
$with_session with session information (true by default)

displayErrorAndDie() 정적인 공개 메소드

Simple Error message page
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

displayMenuAll() 정적인 공개 메소드

Display responsive menu
부터: 0.90.1
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

displayMessageAfterRedirect() 정적인 공개 메소드

Display a div containing messages set in session in the previous page
static public displayMessageAfterRedirect ( )

displayNotFoundError() 정적인 공개 메소드

Display common message for item not found
static public displayNotFoundError ( ) : Nothing
리턴 Nothing

displayProgressBar() 정적인 공개 메소드

Display a simple progress bar
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

displayRightError() 정적인 공개 메소드

Display common message for privileges errors
static public displayRightError ( ) : Nothing
리턴 Nothing (die)

displayTitle() 정적인 공개 메소드

Common Title Function
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

entities_deep() 정적인 공개 메소드

Recursivly execute htmlentities on an Array
static public entities_deep ( $value ) : array
$value string or array
리턴 array of value (same struct as input)

entity_decode_deep() 정적인 공개 메소드

Recursivly execute html_entity_decode on an Array
static public entity_decode_deep ( $value ) : array
$value string or array
리턴 array of value (same struct as input)

file() 정적인 공개 메소드

Files are uploaded in files/_tmp/ directory
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

fileScript() 정적인 공개 메소드

fileScript : file upload script
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)

formatAttribute() 정적인 공개 메소드

Formats an individual attribute, and returns the string value of the composed attribute.
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.

formatNumber() 정적인 공개 메소드

Convert a number to correct display
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

generateImageName() 정적인 공개 메소드

static public generateImageName ( ) : string
리턴 string

getCheckAllAsCheckbox() 정적인 공개 메소드

Get "check All as" checkbox
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

getCheckbox() 정적인 공개 메소드

Get a checkbox.
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

getConfirmationOnActionScript() 정적인 공개 메소드

Get confirmation on button or link before action
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

getCopyrightMessage() 정적인 공개 메소드

Get copyright message as HTML (used in footers)
부터: 9.1
static public getCopyrightMessage ( ) : text
리턴 text

getCriterionForMassiveCheckboxes() 정적인 공개 메소드

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
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

getGenericDateTimeSearchItems() 정적인 공개 메소드

Get items to display for showGenericDateTimeSearch
또한 보기: showGenericDateTimeSearch
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

getMassiveActionCheckBox() 정적인 공개 메소드

Get the massive action checkbox
static public getMassiveActionCheckBox ( $itemtype, $id, array $options = [] ) : get
$itemtype Massive action itemtype
$id ID of the item
$options array array
리턴 get checkbox

getMenuInfos() 정적인 공개 메소드

static public getMenuInfos ( ) : string
리턴 string

getOpenMassiveActionsForm() 정적인 공개 메소드

Get open form for massive action string
static public getOpenMassiveActionsForm ( $name = '' ) : open
$name given name/id to the form (default '')
리턴 open form string

getSimpleForm() 정적인 공개 메소드

create a minimal form for simple action
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 '')

glpi_flush() 정적인 공개 메소드

Flush the current displayed items (do not works really fine)
static public glpi_flush ( )

header() 정적인 공개 메소드

Print a nice HTML head for every page
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 '')

header_nocache() 정적인 공개 메소드

Set page not to use the cache
static public header_nocache ( )

helpFooter() 정적인 공개 메소드

Print footer for help page
static public helpFooter ( )

helpHeader() 정적인 공개 메소드

Print a nice HTML head for help page
static public helpHeader ( $title, $url = '' )
$title title of the page
$url not used anymore (default '')

hidden() 정적인 공개 메소드

If value of options is an array then recursively parse it to generate as many hidden input as necessary
static public hidden ( $fieldName, $options = [] ) : string
$fieldName Name of a field
$options Array of HTML attributes.
리턴 string A generated hidden input

image() 정적인 공개 메소드

This method will set an empty alt attribute if no alt and no title is not supplied
static public image ( $path, $options = [] ) : string
$path Path to the image file
$options Array of HTML attributes - `url` If provided an image link will be generated and the link will point at `$options['url']`.
리턴 string completed img tag

imagePaste() 정적인 공개 메소드

imagePaste : Show image paste for an item, with TinyMce
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)

includeHeader() 정적인 공개 메소드

Include common HTML headers
static public includeHeader ( $title = '' ) : nothing
$title title used for the page (default '')
리턴 nothing

initEditorSystem() 정적인 공개 메소드

Init the Editor System to a textarea
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

initImagePasteSystem() 정적인 공개 메소드

Init the Image paste System for tiny mce
static public initImagePasteSystem ( $name, $rand ) : nothing
$name name of the html textarea to use
$rand rand of the html textarea to use
리턴 nothing

input() 정적인 공개 메소드

Creates a text input field.
static public input ( $fieldName, $options = [] ) : string
$fieldName Name of a field
$options Array of HTML attributes.
리턴 string A generated hidden input

jsAdaptDropdown() 정적인 공개 메소드

Adapt dropdown to clean JS
static public jsAdaptDropdown ( $id, $params = [] ) : String
$id string id of the dom element
$params array of parameters
리턴 String

jsAjaxDropdown() 정적인 공개 메소드

Create Ajax dropdown to clean JS
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

jsAlertCallback() 정적인 공개 메소드

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.
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)

jsConfirmCallback() 정적인 공개 메소드

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.
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)

jsDisable() 정적인 공개 메소드

Get javascript code for disable an item
static public jsDisable ( $id ) : String
$id string id of the dom element
리턴 String

jsEnable() 정적인 공개 메소드

Get javascript code for enable an item
static public jsEnable ( $id ) : String
$id string id of the dom element
리턴 String

jsGetDropdownValue() 정적인 공개 메소드

Get item value
static public jsGetDropdownValue ( $id ) : string
$id string id of the dom element
리턴 string

jsGetElementbyID() 정적인 공개 메소드

Get javascript code to get item by id
static public jsGetElementbyID ( $id ) : String
$id string id of the dom element
리턴 String

jsHide() 정적인 공개 메소드

Get javascript code for hide an item
static public jsHide ( $id ) : String
$id string id of the dom element
리턴 String

jsSetDropdownValue() 정적인 공개 메소드

Set dropdown value
static public jsSetDropdownValue ( $id, $value ) : string
$id string id of the dom element
$value string value to set
리턴 string

jsShow() 정적인 공개 메소드

Get javascript code for hide an item
static public jsShow ( $id ) : String
$id string id of the dom element
리턴 String

makeTitle() 정적인 공개 메소드

Create a title for list, as "List (5 on 35)"
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

nl2br_deep() 정적인 공개 메소드

Recursivly execute nl2br on an Array
static public nl2br_deep ( $value ) : array
$value string or array
리턴 array of value (same struct as input)

nullFooter() 정적인 공개 메소드

Print footer for null page
static public nullFooter ( )

nullHeader() 정적인 공개 메소드

Print a nice HTML head with no controls
static public nullHeader ( $title, $url = '' )
$title title of the page
$url not used anymore (default '')

openArrowMassives() 정적인 공개 메소드

show arrow for massives actions : opening
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

openMassiveActionsForm() 정적인 공개 메소드

Display open form for massive action
static public openMassiveActionsForm ( $name = '' ) : nothing
$name given name/id to the form (default '')
리턴 nothing / display item

parseAttributes() 정적인 공개 메소드

Returns a space-delimited string with items of the $options array.
static public parseAttributes ( $options = [] ) : string
$options Array of options.
리턴 string Composed attributes.

popFooter() 정적인 공개 메소드

Print footer for a modal window
static public popFooter ( )

popHeader() 정적인 공개 메소드

Print a nice HTML head for modal window (nothing to display)
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)

printAjaxPager() 정적인 공개 메소드

Print Ajax pager for list in tab panel
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)

printCleanArray() 정적인 공개 메소드

Clean Printing of and array in a table ONLY FOR DEBUG
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

printPager() 정적인 공개 메소드

Print pager for search option (first/previous/next/last)
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)

printPagerForm() 정적인 공개 메소드

Display the list_limit combo choice
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)

progressBar() 정적인 공개 메소드

Manage progresse bars
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)

redefineAlert() 정적인 공개 메소드

In this function, we redefine 'window.alert' javascript function by a jquery-ui dialog equivalent (but prettier).
static public redefineAlert ( )

redefineConfirm() 정적인 공개 메소드

This dialog is normally asynchronous and can't return a boolean like naive window.confirm. We manage this behavior with a global variable 'confirmed' who watchs the acceptation of dialog. In this case, we trigger a new click on element to return the value (and without display dialog)
static public redefineConfirm ( )

redirect() 정적인 공개 메소드

Redirection hack
static public redirect ( $dest ) : nothing
$dest string: Redirection destination
리턴 nothing

redirectToLogin() 정적인 공개 메소드

Redirection to Login page
static public redirectToLogin ( $params = '' ) : nothing
$params param to add to URL (default '')
리턴 nothing

resume_name() 정적인 공개 메소드

Resume a name for display
static public resume_name ( $string, $length = 255 ) : cut
$string string string to resume
$length integer resume length (default 255)
리턴 cut string

resume_text() 정적인 공개 메소드

Resume text for followup
static public resume_text ( $string, $length = 255 ) : cut
$string string string to resume
$length integer resume length (default 255)
리턴 cut string

script() 정적인 공개 메소드

Returns one or many script tags depending on the number of scripts given.
static public script ( $url ) : String
$url String of javascript file to include
리턴 String of script tags

scriptBlock() 정적인 공개 메소드

Wrap $script in a script tag.
static public scriptBlock ( $script ) : string
$script The script to wrap
리턴 string

scriptEnd() 정적인 공개 메소드

Generates a script tag inline
static public scriptEnd ( ) : mixed
리턴 mixed depending on the settings of scriptStart() either a script tag or null

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.
static public scriptStart ( )

showCheckbox() 정적인 공개 메소드

또한 보기: Html::getCheckbox()
static public showCheckbox ( array $options = [] ) : nothing
$options array array
리턴 nothing (display only)

showCheckboxMatrix() 정적인 공개 메소드

Display choice matrix
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

showColorField() 정적인 공개 메소드

Display Color field
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)

showDateField() 정적인 공개 메소드

Display Date form with calendar
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

showDateFormItem() 정적인 공개 메소드

Display Date form with calendar
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

showDateTimeField() 정적인 공개 메소드

Display DateTime form with calendar
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

showDateTimeFormItem() 정적인 공개 메소드

Display DateTime form with calendar
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

showGenericDateTimeSearch() 정적인 공개 메소드

Show generic date search
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

showMassiveActionCheckBox() 정적인 공개 메소드

Show the massive action checkbox
static public showMassiveActionCheckBox ( $itemtype, $id, array $options = [] ) : show
$itemtype Massive action itemtype
$id ID of the item
$options array array
리턴 show checkbox

showMassiveActions() 정적인 공개 메소드

Display massive actions
부터: 0.84 (before Search::displayMassiveActions)
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

showProfileSelecter() 정적인 공개 메소드

Print the form used to select profile if several are available
static public showProfileSelecter ( $target ) : nothing
$target target of the form
리턴 nothing

showSimpleForm() 정적인 공개 메소드

create a minimal form for simple action
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 '')

showToolTip() 정적인 공개 메소드

Show a tooltip on an item
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)

simpleHeader() 정적인 공개 메소드

Print a simple HTML head with links
static public simpleHeader ( $title, $links = [] )
$title title of the page
$links array of links to display

submit() 정적인 공개 메소드

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
static public submit ( $caption, $options = [] ) : string
$caption caption of the input
$options Array of options. - image : will use a submit image input - `confirm` JavaScript confirmation message. - `confirmaction` optional action to do on confirmation
리턴 string A HTML submit button

timestampToString() 정적인 공개 메소드

Make a good string from the unix timestamp $sec
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