프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$common_fields | Common fields used for all profiles type | ||
$dohistory | |||
$helpdesk_rights | Helpdesk fields of helpdesk profiles | ||
$rightname |
메소드 | 설명 | |
---|---|---|
cleanDBonPurge ( ) | ||
cleanProfile ( ) | Unset unused rights for helpdesk | |
currentUserHaveMoreRightThan ( $IDs = [] ) : boolean | Is the current user have more right than all profiles in parameters | |
defineTabs ( $options = [] ) | ||
displayLifeCycleMatrix ( $title, $html_field, $db_field, $statuses, $canedit ) : nothing | Display the matrix of the elements lifecycle of the elements | |
displayLifeCycleMatrixTicketHelpdesk ( $title, $html_field, $db_field, $canedit ) : nothing | Display the matrix of the elements lifecycle of the elements | |
displayRightsChoiceMatrix ( array $rights, array $options = [] ) : random | Display rights choice matrix | |
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
dropdownHelpdeskItemtypes ( $options ) | Dropdown profiles which have rights under the active one | |
dropdownNoneReadWrite ( $name, $value, $none = 1, $read = 1, $write = 1 ) : nothing | Make a select box for a None Read Write choice | |
dropdownRight ( $name, $options = [] ) : nothing | Make a select box for a None Read Write choice | |
dropdownRights ( array $values, $name, $current, $options = [] ) | Make a select box for rights | |
dropdownUnder ( $options = [] ) | Dropdown profiles which have rights under the active one | |
getDefault ( ) : integer | Get the default Profile for new user | |
getForbiddenStandardMassiveAction ( ) | ||
getHelpdeskHardwareTypeName ( $value ) | ||
getHelpdeskHardwareTypes ( $rights = false ) | ||
getHelpdeskItemtypes ( ) | ||
getInterfaceName ( $value ) | ||
getInterfaces ( ) | ||
getLinearRightChoice ( array $elements, array $options = [] ) : content | Get right linear right choice. | |
getRightsFor ( $itemtype, $interface = 'central' ) : rights | Get rights for an itemtype | |
getSearchOptions ( ) | ||
getSpecificValueToDisplay ( $field, $values, array $options = [] ) | ||
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
getTypeName ( $nb ) | ||
getUnderActiveProfileRestrictRequest ( $separator = "AND" ) : SQL | Get SQL restrict request to determine profiles with less rights than the active one | |
haveUserRight ( $user, $right, $valright, $entity ) : boolean | function to check one right of a user | |
post_addItem ( ) | ||
post_getEmpty ( ) | ||
post_getFromDB ( ) | ||
post_updateItem ( $history = 1 ) | ||
pre_deleteItem ( ) : boolean | check right before delete | |
prepareInputForAdd ( $input ) | ||
prepareInputForUpdate ( $input ) | ||
showForm ( $ID, $options = [] ) : boolean | Print the profile form headers | |
showFormAdmin ( $openform = true, $closeform = true ) | Print the central form for a profile | |
showFormAsset ( $openform = true, $closeform = true ) | Print the Asset rights form for the current profile | |
showFormLifeCycle ( $openform = true, $closeform = true ) | Print the Life Cycles form for the current profile | |
showFormLifeCycleHelpdesk ( $openform = true, $closeform = true ) | Print the Life Cycles form for the current profile | |
showFormManagement ( $openform = true, $closeform = true ) | Print the Management rights form for the current profile | |
showFormSetup ( $openform = true, $closeform = true ) | Print the central form for a profile | |
showFormTools ( $openform = true, $closeform = true ) | Print the Tools rights form for the current profile | |
showFormToolsHelpdesk ( ) | Print the helpdesk right form for the current profile | |
showFormTracking ( $openform = true, $closeform = true ) | Print the Tracking right form for the current profile | |
showFormTrackingHelpdesk ( ) | Print the helpdesk right form for the current profile | |
showLegend ( ) |
static public currentUserHaveMoreRightThan ( $IDs = [] ) : boolean | ||
$IDs | array of profile ID to test | |
리턴 | boolean | true if have more right |
public displayLifeCycleMatrix ( $title, $html_field, $db_field, $statuses, $canedit ) : nothing | ||
$title | the kind of lifecycle | |
$html_field | field that is sent to _POST | |
$db_field | field inside the DB (to get current state) | |
$statuses | all available statuses for the given cycle (obj::getAllStatusArray()) | |
$canedit | can we edit the elements ? | |
리턴 | nothing |
public displayLifeCycleMatrixTicketHelpdesk ( $title, $html_field, $db_field, $canedit ) : nothing | ||
$title | the kind of lifecycle | |
$html_field | field that is sent to _POST | |
$db_field | field inside the DB (to get current state) | |
$canedit | can we edit the elements ? | |
리턴 | nothing |
public displayRightsChoiceMatrix ( array $rights, array $options = [] ) : random | ||
$rights | array | array possible: 'itemtype' => the type of the item to check (as passed to self::getRightsFor()) 'rights' => when use of self::getRightsFor() is impossible 'label' => the label for the right 'field' => the name of the field inside the DB and HTML form (prefixed by '_') 'html_field' => when $html_field != '_'.$field |
$options | array | array possible: 'title' the title of the matrix 'canedit' 'default_class' the default CSS class used for the row |
리턴 | random | value used to generate the ids |
static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
$item | CommonGLPI |
static public dropdownHelpdeskItemtypes ( $options ) | ||
$options | array of possible options: - name : string / name of the select (default is profiles_id) - values : array of values |
static public dropdownNoneReadWrite ( $name, $value, $none = 1, $read = 1, $write = 1 ) : nothing | ||
$name | select name | |
$value | preselected value. | |
$none | display none choice ? (default 1) | |
$read | display read choice ? (default 1) | |
$write | display write choice ? (default 1) | |
리턴 | nothing | (print out an HTML select box) \deprecated since version 0.84 use dropdownRight instead |
static public dropdownRight ( $name, $options = [] ) : nothing | ||
$name | select name | |
$options | array of possible options: - value : preselected value. - nonone : hide none choice ? (default false) - noread : hide read choice ? (default false) - nowrite : hide write choice ? (default false) - display : display or get string (default true) - rand : specific rand (default is generated one) | |
리턴 | nothing | (print out an HTML select box) |
static public dropdownRights ( array $values, $name, $current, $options = [] ) | ||
$values | array | array of values to display |
$name | integer name of the dropdown | |
$current | integer value in database (sum of rights) | |
$options | array |
static public dropdownUnder ( $options = [] ) | ||
$options | array of possible options: - name : string / name of the select (default is profiles_id) - value : integer / preselected value (default 0) |
static public getDefault ( ) : integer | ||
리턴 | integer | profiles_id |
static public getHelpdeskHardwareTypeName ( $value ) | ||
$value |
static public getHelpdeskHardwareTypes ( $rights = false ) | ||
$rights | boolean (false by default) |
static public getLinearRightChoice ( array $elements, array $options = [] ) : content | ||
$elements | array | array all pair identifier => label |
$options | array | array possible: 'canedit' 'field' name of the HTML field 'value' the value inside the database 'max_per_line' maximum number of elements per line 'check_all' add a checkbox to check or uncheck every checkbox 'rand' random value used to generate the ids 'zero_on_empty' do we send 0 when checkbox is not checked ? 'display' 'check_method' method used to check the right |
리턴 | content | if !display |
static public getRightsFor ( $itemtype, $interface = 'central' ) : rights | ||
$itemtype | string itemtype | |
$interface | string (default 'central') | |
리턴 | rights |
static public getSpecificValueToDisplay ( $field, $values, array $options = [] ) | ||
$field | ||
$values | ||
$options | array | array |
static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
$field | ||
$name | (default '') | |
$values | (default '') | |
$options | array | array |
public getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
$item | CommonGLPI |
static public getUnderActiveProfileRestrictRequest ( $separator = "AND" ) : SQL | ||
$separator | string Separator used at the beginning of the request (default 'AND') | |
리턴 | SQL | restrict string |
static public haveUserRight ( $user, $right, $valright, $entity ) : boolean | ||
$user | integer id of the user to check rights | |
$right | string right to check | |
$valright | integer/string/array value of the rights searched | |
$entity | integer id of the entity | |
리턴 | boolean |
public showFormAdmin ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormAsset ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormLifeCycle ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormLifeCycleHelpdesk ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormManagement ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormSetup ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormTools ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormToolsHelpdesk ( ) |
public showFormTracking ( $openform = true, $closeform = true ) | ||
$openform | boolean open the form (true by default) | |
$closeform | boolean close the form (true by default) |
public showFormTrackingHelpdesk ( ) |
public static $common_fields |
public static $helpdesk_rights |