PHP 클래스 Dropdown, glpi

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

공개 메소드들

메소드 설명
addNewCondition ( $condition )
dropdownIcons ( $myname, $value, $store_path, $display = true ) : nothing Make a select box for icons
dropdownUsedItemTypes ( $name, $itemtype_ref, $options = [] ) : nothing Make a select box for device type
getDeviceItemTypes ( ) : array Get the Device list name the user is allowed to edit
getDropdownArrayNames ( $table, $ids ) : array Get values of a dropdown for a list of item
getDropdownName ( $table, $id, $withcomment, $translate = true, $tooltip = true ) : string Get the value of a dropdown
getGlobalSwitch ( $value ) : the Get the label associated with a management type
getLanguageName ( $value )
getStandardDropdownItemTypes ( ) : array Get the dropdown list name the user is allowed to edit
getValueWithUnit ( $value, $unit ) Get value with unit / Automatic management of standar unit (year, month, %, .
getYesNo ( $value ) : string Get Yes No string
import ( $itemtype, $input ) : the Import a dropdown - check if already exists
importExternal ( $itemtype, $value, $entities_id, $external_params = [], $comment = '', $add = true ) : integer Import a value in a dropdown table.
show ( $itemtype, $options = [] ) : boolean Print out an HTML "
showAdvanceDateRestrictionSwitch ( $enabled ) Toggle view in LDAP user import/synchro between no restriction and date restriction
showAllItems ( $myname, $value_type, $value, $entity_restrict, $types = '', $onlyglobal = false, $checkright = false, $itemtypename = 'itemtype' ) : nothing Make a select box for all items
showFromArray ( $name, array $elements, $options = [] ) Dropdown of values in an array
showGMT ( $name, $value = '' ) Dropdown for GMT selection
showGlobalSwitch ( $ID, $attrs = [] ) Dropdown for global item management
showHours ( $name, $options = [] ) : Nothing Print a select with hours
showInteger ( $myname, $value, $min, $max = 100, $step = 1, $toadd = [], $options = [] ) Dropdown integers
showItemType ( $types = '', $options = [] ) : integer show a dropdown to selec a type
showItemTypeList ( $optgroup ) Display a list to select a itemtype with link to search form
showItemTypeMenu ( $title, $optgroup, $value = '' ) Display a menu to select a itemtype which open the search form
showItemTypes ( $name, $types = [], $options = [] ) : nothing Make a select box for device type
showLanguages ( $myname, $options = [] ) Dropdown available languages
showListLimit ( $onchange = '' ) show dropdown to select list limit
showNumber ( $myname, $options = [] ) Dropdown numbers
showOutputFormat ( ) show dropdown for output format
showPrivatePublicSwitch ( $is_private, $entity, $is_recursive ) Private / Public switch for items which may be assign to a user and/or an entity
showSelectItemFromItemtypes ( array $options = [] ) : randomized Make a select box for all items
showTimeStamp ( $myname, $options = [] ) Dropdown integers
showYesNo ( $name, $value, $restrict_to, $params = [] ) : rand Make a select box for a boolean choice (Yes/No) or display a checkbox. Add a 'use_checkbox' = true to the $params array to display a checkbox instead a select box

메소드 상세

addNewCondition() 정적인 공개 메소드

static public addNewCondition ( $condition )

dropdownIcons() 정적인 공개 메소드

Make a select box for icons
static public dropdownIcons ( $myname, $value, $store_path, $display = true ) : nothing
$myname the name of the HTML select
$value the preselected value we want
$store_path path where icons are stored
$display boolean display of get string ? (true by default)
리턴 nothing (print out an HTML select box)

dropdownUsedItemTypes() 정적인 공개 메소드

Make a select box for device type
static public dropdownUsedItemTypes ( $name, $itemtype_ref, $options = [] ) : nothing
$name name of the select box
$itemtype_ref string itemtype reference where to search in itemtype field
$options array of possible options: - may be value (default value) / field (used field to search itemtype)
리턴 nothing (print out an HTML select box)

getDeviceItemTypes() 정적인 공개 메소드

Get the Device list name the user is allowed to edit
static public getDeviceItemTypes ( ) : array
리턴 array (group of dropdown) of array (itemtype => localized name)

getDropdownArrayNames() 정적인 공개 메소드

Get values of a dropdown for a list of item
static public getDropdownArrayNames ( $table, $ids ) : array
$table the dropdown table from witch we want values on the select
$ids array containing the ids to get
리턴 array containing the value of the dropdown or   if not exists

getDropdownName() 정적인 공개 메소드

Returns the value of the dropdown from $table with ID $id.
static public getDropdownName ( $table, $id, $withcomment, $translate = true, $tooltip = true ) : string
$table the dropdown table from witch we want values on the select
$id id of the element to get
$withcomment give array with name and comment (default 0)
$translate (true by default)
$tooltip boolean (true by default) returns a tooltip, else returns only 'comment'
리턴 string the value of the dropdown or   if not exists

getGlobalSwitch() 정적인 공개 메소드

Get the label associated with a management type
static public getGlobalSwitch ( $value ) : the
리턴 the label corresponding to it, or ""

getLanguageName() 정적인 공개 메소드

static public getLanguageName ( $value )
$value

getStandardDropdownItemTypes() 정적인 공개 메소드

Get the dropdown list name the user is allowed to edit
static public getStandardDropdownItemTypes ( ) : array
리턴 array (group of dropdown) of array (itemtype => localized name)

getValueWithUnit() 정적인 공개 메소드

..)
static public getValueWithUnit ( $value, $unit )
$value integer number of item
$unit string of unit (maybe year, month, day, hour, % for standard management)

getYesNo() 정적인 공개 메소드

Get Yes No string
static public getYesNo ( $value ) : string
$value Yes No value
리턴 string

import() 정적인 공개 메소드

Import a dropdown - check if already exists
static public import ( $itemtype, $input ) : the
$itemtype string name of the class
$input array of value to import
리턴 the ID of the new

importExternal() 정적인 공개 메소드

This import a new dropdown if it doesn't exist - Play dictionnary if needed
static public importExternal ( $itemtype, $value, $entities_id, $external_params = [], $comment = '', $add = true ) : integer
$itemtype string name of the class
$value string Value of the new dropdown. (need to be addslashes)
$entities_id integer entity in case of specific dropdown (default -1)
$external_params array (need to be addslashes)
$comment (default '') (need to be addslashes)
$add if true, add it if not found. if false, just check if exists (true by default)
리턴 integer : dropdown id.

show() 정적인 공개 메소드

Print out an HTML "