PHP Класс Contract, glpi

Наследование: extends SugarBean
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$dohistory From CommonDBTM
$rightname

Защищенные свойства (Protected)

Свойство Тип Описание
$forward_entity_to
$usenotepad

Открытые методы

Метод Описание
cleanDBonPurge ( )
cronContract ( $task = NULL ) Cron action on contracts : alert depending of the config : on notice and expire
cronInfo ( $name )
defineTabs ( $options = [] )
dropdown ( $options = [] ) : Nothing Print a select with contracts
dropdownAlert ( array $options )
dropdownContractRenewal ( $name, $value, $display = true ) : Nothing Print a select with contract renewal
getAlertName ( $val = NULL ) : array Get the possible value for contract alert
getContractRenewalIDByName ( $value ) : the Get renewal ID by name
getContractRenewalName ( $value ) : string Get the renewal type name
getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
getSearchOptions ( )
getSearchOptionsToAdd ( )
getSpecificMassiveActions ( $checkitem = NULL )
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
getSuppliersNames ( ) : string Get the entreprise name for the contract
getTypeName ( $nb )
getUnallowedFieldsForUnicity ( )
post_addItem ( )
post_getEmpty ( )
pre_updateInDB ( )
prepareInputForAdd ( $input )
showCentral ( ) : Nothing Show central contract resume HTML array
showDebug ( ) Display debug information for current object
showForm ( $ID, $options = [] ) : boolean Print the contract form

Описание методов

cleanDBonPurge() публичный Метод

public cleanDBonPurge ( )

cronContract() статический публичный Метод

Cron action on contracts : alert depending of the config : on notice and expire
static public cronContract ( $task = NULL )
$task for log, if NULL display (default NULL)

cronInfo() статический публичный Метод

static public cronInfo ( $name )

defineTabs() публичный Метод

public defineTabs ( $options = [] )

dropdown() статический публичный Метод

Print a select named $name with contracts options and selected value $value
static public dropdown ( $options = [] ) : Nothing
$options array of possible options: - name : string / name of the select (default is contracts_id) - value : integer / preselected value (default 0) - entity : integer or array / restrict to a defined entity or array of entities (default -1 : no restriction) - rand : (defauolt mt_rand) - entity_sons : boolean / if entity restrict specified auto select its sons only available if entity is a single value not an array (default false) - used : array / Already used items ID: not to display in dropdown (default empty) - nochecklimit : boolean / disable limit for nomber of device (for supplier, default false) - on_change : string / value to transmit to "onChange" - display : boolean / display or return string (default true) - expired : boolean / display expired contract (default false)
Результат Nothing (display)

dropdownAlert() статический публичный Метод

static public dropdownAlert ( array $options )
$options array array

dropdownContractRenewal() статический публичный Метод

Print a select named $name with contract renewal options and selected value $value
static public dropdownContractRenewal ( $name, $value, $display = true ) : Nothing
$name string HTML select name
$value integer HTML select selected value (default = 0)
$display boolean get or display string ? (true by default)
Результат Nothing (display)

getAlertName() статический публичный Метод

Get the possible value for contract alert
static public getAlertName ( $val = NULL ) : array
$val if not set, ask for all values, else for 1 value (default NULL)
Результат array or string

getContractRenewalIDByName() статический публичный Метод

Get renewal ID by name
static public getContractRenewalIDByName ( $value ) : the
$value the name of the renewal
Результат the ID of the renewal

getContractRenewalName() статический публичный Метод

Get the renewal type name
static public getContractRenewalName ( $value ) : string
$value integer HTML select selected value
Результат string

getMassiveActionsForItemtype() статический публичный Метод

См. также: CommonDBTM::getMassiveActionsForItemtype()
static public getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
$actions array
$checkitem CommonDBTM

getSearchOptions() публичный Метод

public getSearchOptions ( )

getSearchOptionsToAdd() статический публичный Метод

static public getSearchOptionsToAdd ( )

getSpecificMassiveActions() публичный Метод

См. также: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

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

getSuppliersNames() публичный Метод

Get the entreprise name for the contract
public getSuppliersNames ( ) : string
Результат string of names (HTML)

getTypeName() статический публичный Метод

static public getTypeName ( $nb )

getUnallowedFieldsForUnicity() публичный Метод

post_addItem() публичный Метод

public post_addItem ( )

post_getEmpty() публичный Метод

public post_getEmpty ( )

pre_updateInDB() публичный Метод

public pre_updateInDB ( )

prepareInputForAdd() публичный Метод

См. также: CommonDBTM::prepareInputForAdd()
public prepareInputForAdd ( $input )

showCentral() статический публичный Метод

Show central contract resume HTML array
static public showCentral ( ) : Nothing
Результат Nothing (display)

showDebug() публичный Метод

Display debug information for current object
public showDebug ( )

showForm() публичный Метод

Print the contract form
public showForm ( $ID, $options = [] ) : boolean
$ID integer ID of the item
$options array - target filename : where to go when done. - withtemplate boolean : template or basic item
Результат boolean item found

Описание свойств

$dohistory публичное свойство

From CommonDBTM
public $dohistory

$forward_entity_to защищенное статическое свойство

protected static $forward_entity_to

$rightname статическое публичное свойство

static public $rightname

$usenotepad защищенное свойство

protected $usenotepad