PHP 클래스 Profile, glpi

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

공개 프로퍼티들

프로퍼티 타입 설명
$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 ( )

메소드 상세

cleanDBonPurge() 공개 메소드

public cleanDBonPurge ( )

cleanProfile() 공개 메소드

Unset unused rights for helpdesk
public cleanProfile ( )

currentUserHaveMoreRightThan() 정적인 공개 메소드

Is the current user have more right than all profiles in parameters
static public currentUserHaveMoreRightThan ( $IDs = [] ) : boolean
$IDs array of profile ID to test
리턴 boolean true if have more right

defineTabs() 공개 메소드

public defineTabs ( $options = [] )

displayLifeCycleMatrix() 공개 메소드

Display the matrix of the elements lifecycle of the elements
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

displayLifeCycleMatrixTicketHelpdesk() 공개 메소드

Display the matrix of the elements lifecycle of the elements
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

displayRightsChoiceMatrix() 공개 메소드

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

displayTabContentForItem() 정적인 공개 메소드

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
$item CommonGLPI

dropdownHelpdeskItemtypes() 정적인 공개 메소드

Dropdown profiles which have rights under the active one
static public dropdownHelpdeskItemtypes ( $options )
$options array of possible options: - name : string / name of the select (default is profiles_id) - values : array of values

dropdownNoneReadWrite() 정적인 공개 메소드

Make a select box for a None Read Write choice
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

dropdownRight() 정적인 공개 메소드

Make a select box for a None Read Write choice
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)

dropdownRights() 정적인 공개 메소드

Make a select box for rights
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

dropdownUnder() 정적인 공개 메소드

Dropdown profiles which have rights under the active one
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)

getDefault() 정적인 공개 메소드

Get the default Profile for new user
static public getDefault ( ) : integer
리턴 integer profiles_id

getForbiddenStandardMassiveAction() 공개 메소드

getHelpdeskHardwareTypeName() 정적인 공개 메소드

static public getHelpdeskHardwareTypeName ( $value )
$value

getHelpdeskHardwareTypes() 정적인 공개 메소드

static public getHelpdeskHardwareTypes ( $rights = false )
$rights boolean (false by default)

getHelpdeskItemtypes() 정적인 공개 메소드

static public getHelpdeskItemtypes ( )

getInterfaceName() 정적인 공개 메소드

static public getInterfaceName ( $value )
$value

getInterfaces() 정적인 공개 메소드

static public getInterfaces ( )

getLinearRightChoice() 정적인 공개 메소드

Get right linear right choice.
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

getRightsFor() 정적인 공개 메소드

Get rights for an itemtype
static public getRightsFor ( $itemtype, $interface = 'central' ) : rights
$itemtype string itemtype
$interface string (default 'central')
리턴 rights

getSearchOptions() 공개 메소드

public getSearchOptions ( )

getSpecificValueToDisplay() 정적인 공개 메소드

static public getSpecificValueToDisplay ( $field, $values, array $options = [] )
$field
$values
$options array array

getSpecificValueToSelect() 정적인 공개 메소드

static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
$field
$name (default '')
$values (default '')
$options array array

getTabNameForItem() 공개 메소드

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() 정적인 공개 메소드

static public getTypeName ( $nb )

getUnderActiveProfileRestrictRequest() 정적인 공개 메소드

Get SQL restrict request to determine profiles with less rights than the active one
static public getUnderActiveProfileRestrictRequest ( $separator = "AND" ) : SQL
$separator string Separator used at the beginning of the request (default 'AND')
리턴 SQL restrict string

haveUserRight() 정적인 공개 메소드

function to check one right of a user
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

post_addItem() 공개 메소드

public post_addItem ( )

post_getEmpty() 공개 메소드

public post_getEmpty ( )

post_getFromDB() 공개 메소드

public post_getFromDB ( )

post_updateItem() 공개 메소드

public post_updateItem ( $history = 1 )

pre_deleteItem() 공개 메소드

check right before delete
public pre_deleteItem ( ) : boolean
리턴 boolean

prepareInputForAdd() 공개 메소드

public prepareInputForAdd ( $input )

prepareInputForUpdate() 공개 메소드

public prepareInputForUpdate ( $input )

showForm() 공개 메소드

Print the profile form headers
public showForm ( $ID, $options = [] ) : boolean
$ID integer : Id of the item to print
$options array of possible options - target filename : where to go when done. - withtemplate boolean : template or basic item
리턴 boolean item found

showFormAdmin() 공개 메소드

Print the central form for a profile
public showFormAdmin ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormAsset() 공개 메소드

Print the Asset rights form for the current profile
public showFormAsset ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormLifeCycle() 공개 메소드

Print the Life Cycles form for the current profile
public showFormLifeCycle ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormLifeCycleHelpdesk() 공개 메소드

@since version 0.85
public showFormLifeCycleHelpdesk ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormManagement() 공개 메소드

Print the Management rights form for the current profile
public showFormManagement ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormSetup() 공개 메소드

Print the central form for a profile
public showFormSetup ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormTools() 공개 메소드

Print the Tools rights form for the current profile
public showFormTools ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormToolsHelpdesk() 공개 메소드

Print the helpdesk right form for the current profile

showFormTracking() 공개 메소드

Print the Tracking right form for the current profile
public showFormTracking ( $openform = true, $closeform = true )
$openform boolean open the form (true by default)
$closeform boolean close the form (true by default)

showFormTrackingHelpdesk() 공개 메소드

Print the helpdesk right form for the current profile

showLegend() 공개 메소드

public showLegend ( )

프로퍼티 상세

$common_fields 공개적으로 정적으로 프로퍼티

Common fields used for all profiles type
public static $common_fields

$dohistory 공개적으로 프로퍼티

public $dohistory

$helpdesk_rights 공개적으로 정적으로 프로퍼티

Helpdesk fields of helpdesk profiles
public static $helpdesk_rights

$rightname 정적으로 공개적으로 프로퍼티

static public $rightname