PHP Class CommonITILValidation, glpi

Inheritance: extends CommonDBChild
Show file Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$auto_message_on_action From CommonDBTM
$log_history_add
$log_history_delete
$log_history_update

Public Methods

Method Description
alertValidation ( CommonITILObject $item, $type )
alreadyExists ( $items_id, $users_id ) : boolean Check if validation already exists
canCreate ( )
canCreateItem ( ) : boolean Is the current user have right to delete the current validation ?
canDeleteItem ( ) : boolean Is the current user have right to delete the current validation ?
canUpdate ( )
canUpdateItem ( ) : boolean Is the current user have right to update the current validation ?
canValidate ( $items_id )
canView ( )
computeValidationStatus ( CommonITILObject $item ) : validation Compute the validation status
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
dropdownStatus ( $name, $options = [] ) : nothing Dropdown of validation status
dropdownValidator ( array $options = [] ) : nothing Dropdown of validator
getAllStatusArray ( $withmetaforsearch = false, $global = false ) : an get the Ticket validation status list
getAllValidationStatusArray ( ) : an Get the ITIL object all validation status list
getCanValidationStatusArray ( ) : an Get the ITIL object can validation status list
getCreateRights ( )
getForbiddenStandardMassiveAction ( )
getGroupUserHaveRights ( array $options = [] ) : array Get list of users from a group which have validation rights
getHistoryChangeWhenUpdateField ( $field )
getHistoryNameForItem ( CommonDBTM $item, $case )
getItilObjectItemType ( ) rejected
getNumberToValidate ( $users_id ) Get item validation demands count for a user
getNumberValidationForTicket ( $items_id ) Get item validation demands count
getPurgeRights ( )
getRights ( $interface = 'central' )
getSearchOptions ( )
getSearchOptionsToAdd ( )
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
getStatus ( $value ) Get Ticket validation status Name
getStatusColor ( $value ) Get Ticket validation status Color
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTicketStatusNumber ( $items_id, $status ) Get the number of validations attached to an item having a specified status
getTypeName ( $nb )
getValidateRights ( )
getValidationStats ( $tID ) : statistics Get the validation statistics
isAllValidationsHaveSameStatusForTicket ( $items_id ) All validations requests for an item have the same status ?
post_addItem ( )
post_getEmpty ( )
post_updateItem ( $history = 1 )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
showForm ( $ID, $options = [] ) Print the validation form
showFormMassiveAction ( ) Form for Followup on Massive action
showMassiveActionsSubForm ( MassiveAction $ma )
showSummary ( $item ) Print the validation list into item

Method Details

alertValidation() static public method

static public alertValidation ( CommonITILObject $item, $type )
$item CommonITILObject CommonITILObject
$type

alreadyExists() static public method

Check if validation already exists
static public alreadyExists ( $items_id, $users_id ) : boolean
$items_id integer item ID
$users_id integer user ID
return boolean

canCreate() static public method

static public canCreate ( )

canCreateItem() public method

Is the current user have right to delete the current validation ?
public canCreateItem ( ) : boolean
return boolean

canDeleteItem() public method

Is the current user have right to delete the current validation ?
public canDeleteItem ( ) : boolean
return boolean

canUpdate() static public method

static public canUpdate ( )

canUpdateItem() public method

Is the current user have right to update the current validation ?
public canUpdateItem ( ) : boolean
return boolean

canValidate() static public method

static public canValidate ( $items_id )
$items_id ID of the item

canView() static public method

static public canView ( )

computeValidationStatus() static public method

Compute the validation status
static public computeValidationStatus ( CommonITILObject $item ) : validation
$item CommonITILObject CommonITILObject
return validation status

displayTabContentForItem() static public method

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

dropdownStatus() static public method

Dropdown of validation status
static public dropdownStatus ( $name, $options = [] ) : nothing
$name select name
$options array of possible options: - value : default value (default waiting) - all : boolean display all (default false) - global : for global validation (default false) - display : boolean display or get string ? (default true)
return nothing (display)

dropdownValidator() static public method

Dropdown of validator
static public dropdownValidator ( array $options = [] ) : nothing
$options array array of options - name : select name - id : ID of object > 0 Update, < 0 New - entity : ID of entity - right : validation rights - groups_id : ID of group validator - users_id_validate : ID of user validator - applyto
return nothing (display)

getAllStatusArray() static public method

get the Ticket validation status list
static public getAllStatusArray ( $withmetaforsearch = false, $global = false ) : an
$withmetaforsearch boolean (false by default)
$global boolean (true for global status, with "no validation" option) (false by default)
return an array

getAllValidationStatusArray() static public method

Get the ITIL object all validation status list
static public getAllValidationStatusArray ( ) : an
return an array

getCanValidationStatusArray() static public method

Get the ITIL object can validation status list
static public getCanValidationStatusArray ( ) : an
return an array

getCreateRights() static public method

static public getCreateRights ( )

getForbiddenStandardMassiveAction() public method

getGroupUserHaveRights() static public method

Get list of users from a group which have validation rights
static public getGroupUserHaveRights ( array $options = [] ) : array
$options array array possible: groups_id right entity
return array

getHistoryChangeWhenUpdateField() public method

See also: CommonDBConnexity::getHistoryChangeWhenUpdateField

getHistoryNameForItem() public method

See also: CommonDBChild::getHistoryNameForItem
public getHistoryNameForItem ( CommonDBTM $item, $case )
$item CommonDBTM

getItilObjectItemType() public method

rejected

getNumberToValidate() static public method

Get item validation demands count for a user
static public getNumberToValidate ( $users_id )
$users_id integer User ID

getNumberValidationForTicket() static public method

Get item validation demands count
static public getNumberValidationForTicket ( $items_id )
$items_id integer item ID

getPurgeRights() static public method

static public getPurgeRights ( )

getRights() public method

See also: commonDBTM::getRights()
public getRights ( $interface = 'central' )

getSearchOptions() public method

public getSearchOptions ( )

getSearchOptionsToAdd() static public method

static public getSearchOptionsToAdd ( )

getSpecificValueToDisplay() static public method

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

getSpecificValueToSelect() static public method

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

getStatus() static public method

Get Ticket validation status Name
static public getStatus ( $value )
$value status ID

getStatusColor() static public method

Get Ticket validation status Color
static public getStatusColor ( $value )
$value status ID

getTabNameForItem() public method

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

getTicketStatusNumber() static public method

Get the number of validations attached to an item having a specified status
static public getTicketStatusNumber ( $items_id, $status )
$items_id integer item ID
$status status

getTypeName() static public method

static public getTypeName ( $nb )

getValidateRights() static public method

static public getValidateRights ( )

getValidationStats() static public method

Get the validation statistics
static public getValidationStats ( $tID ) : statistics
$tID tickets id
return statistics array

isAllValidationsHaveSameStatusForTicket() static public method

All validations requests for an item have the same status ?
static public isAllValidationsHaveSameStatusForTicket ( $items_id )
$items_id integer item ID

post_addItem() public method

public post_addItem ( )

post_getEmpty() public method

public post_getEmpty ( )

post_updateItem() public method

public post_updateItem ( $history = 1 )

prepareInputForAdd() public method

public prepareInputForAdd ( $input )

prepareInputForUpdate() public method

public prepareInputForUpdate ( $input )

processMassiveActionsForOneItemtype() static public method

See also: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

showForm() public method

Print the validation form
public showForm ( $ID, $options = [] )
$ID integer ID of the item
$options array options used

showFormMassiveAction() static public method

Form for Followup on Massive action
static public showFormMassiveAction ( )

showMassiveActionsSubForm() static public method

See also: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

showSummary() public method

Print the validation list into item
public showSummary ( $item )
$item class

Property Details

$auto_message_on_action public property

From CommonDBTM
public $auto_message_on_action

$log_history_add public static property

public static $log_history_add

$log_history_delete public static property

public static $log_history_delete

$log_history_update public static property

public static $log_history_update