Overview

Namespaces

  • Glpi
    • Cache
    • Console
      • Command
      • Database
      • Ldap
      • Migration
      • Security
      • Task
    • Exception
  • None

Classes

  • AbstractQuery
  • Ajax
  • Alert
  • API
  • APIClient
  • APIRest
  • APIXmlrpc
  • Auth
  • AuthLDAP
  • AuthLdapReplicate
  • AuthMail
  • AutoUpdateSystem
  • Blacklist
  • BlacklistedMailContent
  • Budget
  • BudgetType
  • BusinessCriticity
  • Calendar
  • Calendar_Holiday
  • CalendarSegment
  • Cartridge
  • CartridgeItem
  • CartridgeItem_PrinterModel
  • CartridgeItemType
  • Central
  • Certificate
  • Certificate_Item
  • CertificateType
  • Change
  • Change_Group
  • Change_Item
  • Change_Problem
  • Change_Supplier
  • Change_Ticket
  • Change_User
  • ChangeCost
  • ChangeTask
  • ChangeValidation
  • CliMigration
  • CommonDBChild
  • CommonDBConnexity
  • CommonDBRelation
  • CommonDBTM
  • CommonDBVisible
  • CommonDCModelDropdown
  • CommonDevice
  • CommonDeviceModel
  • CommonDeviceType
  • CommonDropdown
  • CommonGLPI
  • CommonImplicitTreeDropdown
  • CommonITILActor
  • CommonITILCost
  • CommonITILObject
  • CommonITILTask
  • CommonITILValidation
  • CommonTreeDropdown
  • Computer
  • Computer_Item
  • Computer_SoftwareLicense
  • Computer_SoftwareVersion
  • ComputerAntivirus
  • ComputerModel
  • ComputerType
  • ComputerVirtualMachine
  • Config
  • Consumable
  • ConsumableItem
  • ConsumableItemType
  • Contact
  • Contact_Supplier
  • ContactType
  • Contract
  • Contract_Item
  • Contract_Supplier
  • ContractCost
  • ContractType
  • CronTask
  • CronTaskLog
  • Datacenter
  • DBConnection
  • DBmysql
  • DBmysqlIterator
  • DbUtils
  • DCRoom
  • DeviceBattery
  • DeviceBatteryModel
  • DeviceBatteryType
  • DeviceCase
  • DeviceCaseModel
  • DeviceCaseType
  • DeviceControl
  • DeviceControlModel
  • DeviceDrive
  • DeviceDriveModel
  • DeviceFirmware
  • DeviceFirmwareModel
  • DeviceFirmwareType
  • DeviceGeneric
  • DeviceGenericModel
  • DeviceGenericType
  • DeviceGraphicCard
  • DeviceGraphicCardModel
  • DeviceHardDrive
  • DeviceHardDriveModel
  • DeviceMemory
  • DeviceMemoryModel
  • DeviceMemoryType
  • DeviceMotherboard
  • DeviceMotherBoardModel
  • DeviceNetworkCard
  • DeviceNetworkCardModel
  • DevicePci
  • DevicePciModel
  • DevicePowerSupply
  • DevicePowerSupplyModel
  • DeviceProcessor
  • DeviceProcessorModel
  • DeviceSensor
  • DeviceSensorModel
  • DeviceSensorType
  • DeviceSimcard
  • DeviceSimcardType
  • DeviceSoundCard
  • DeviceSoundCardModel
  • DisplayPreference
  • Document
  • Document_Item
  • DocumentCategory
  • DocumentType
  • Domain
  • Dropdown
  • DropdownTranslation
  • Enclosure
  • EnclosureModel
  • Entity
  • Entity_KnowbaseItem
  • Entity_Reminder
  • Entity_RSSFeed
  • Fieldblacklist
  • FieldUnicity
  • Filesystem
  • FQDN
  • FQDNLabel
  • GLPI
  • GLPIKey
  • GLPIMailer
  • GLPINetwork
  • GLPIPDF
  • GLPIUploadHandler
  • Group
  • Group_KnowbaseItem
  • Group_Problem
  • Group_Reminder
  • Group_RSSFeed
  • Group_Ticket
  • Group_User
  • Holiday
  • Html
  • HTMLTableBase
  • HTMLTableCell
  • HTMLTableEntity
  • HTMLTableGroup
  • HTMLTableHeader
  • HTMLTableMain
  • HTMLTableRow
  • HTMLTableSubHeader
  • HTMLTableSuperHeader
  • Infocom
  • InterfaceType
  • IPAddress
  • IPAddress_IPNetwork
  • IPNetmask
  • IPNetwork
  • IPNetwork_Vlan
  • Item_DeviceBattery
  • Item_DeviceCase
  • Item_DeviceControl
  • Item_DeviceDrive
  • Item_DeviceFirmware
  • Item_DeviceGeneric
  • Item_DeviceGraphicCard
  • Item_DeviceHardDrive
  • Item_DeviceMemory
  • Item_DeviceMotherboard
  • Item_DeviceNetworkCard
  • Item_DevicePci
  • Item_DevicePowerSupply
  • Item_DeviceProcessor
  • Item_Devices
  • Item_DeviceSensor
  • Item_DeviceSimcard
  • Item_DeviceSoundCard
  • Item_Disk
  • Item_Enclosure
  • Item_OperatingSystem
  • Item_Problem
  • Item_Project
  • Item_Rack
  • Item_Ticket
  • Itil_Project
  • ITILCategory
  • ITILFollowup
  • ITILSolution
  • Knowbase
  • KnowbaseItem
  • KnowbaseItem_Comment
  • KnowbaseItem_Item
  • KnowbaseItem_Profile
  • KnowbaseItem_Revision
  • KnowbaseItem_User
  • KnowbaseItemCategory
  • KnowbaseItemTranslation
  • LevelAgreement
  • LevelAgreementLevel
  • Line
  • LineOperator
  • LineType
  • Link
  • Link_Itemtype
  • Location
  • Lock
  • Log
  • MailCollector
  • Manufacturer
  • MassiveAction
  • Migration
  • MigrationCleaner
  • Monitor
  • MonitorModel
  • MonitorType
  • Netpoint
  • Network
  • NetworkAlias
  • NetworkEquipment
  • NetworkEquipmentModel
  • NetworkEquipmentType
  • NetworkInterface
  • NetworkName
  • NetworkPort
  • NetworkPort_NetworkPort
  • NetworkPort_Vlan
  • NetworkPortAggregate
  • NetworkPortAlias
  • NetworkPortDialup
  • NetworkPortEthernet
  • NetworkPortFiberchannel
  • NetworkPortInstantiation
  • NetworkPortLocal
  • NetworkPortMigration
  • NetworkPortWifi
  • Notepad
  • Notification
  • Notification_NotificationTemplate
  • NotificationAjax
  • NotificationAjaxSetting
  • NotificationEvent
  • NotificationEventAbstract
  • NotificationEventAjax
  • NotificationEventMailing
  • NotificationMailing
  • NotificationMailingSetting
  • NotificationSetting
  • NotificationSettingConfig
  • NotificationTarget
  • NotificationTargetCartridgeItem
  • NotificationTargetCertificate
  • NotificationTargetChange
  • NotificationTargetCommonITILObject
  • NotificationTargetConsumableItem
  • NotificationTargetContract
  • NotificationTargetCrontask
  • NotificationTargetDBConnection
  • NotificationTargetFieldUnicity
  • NotificationTargetInfocom
  • NotificationTargetMailCollector
  • NotificationTargetObjectLock
  • NotificationTargetPlanningRecall
  • NotificationTargetProblem
  • NotificationTargetProject
  • NotificationTargetProjectTask
  • NotificationTargetReservation
  • NotificationTargetSavedsearch_Alert
  • NotificationTargetSoftwareLicense
  • NotificationTargetTicket
  • NotificationTargetUser
  • NotificationTemplate
  • NotificationTemplateTranslation
  • NotImportedEmail
  • ObjectLock
  • OLA
  • OlaLevel
  • OlaLevel_Ticket
  • OlaLevelAction
  • OlaLevelCriteria
  • OperatingSystem
  • OperatingSystemArchitecture
  • OperatingSystemEdition
  • OperatingSystemKernel
  • OperatingSystemKernelVersion
  • OperatingSystemServicePack
  • OperatingSystemVersion
  • PDU
  • Pdu_Plug
  • PDU_Rack
  • PDUModel
  • PDUType
  • Peripheral
  • PeripheralModel
  • PeripheralType
  • Phone
  • PhoneModel
  • PhonePowerSupply
  • PhoneType
  • Planning
  • PlanningRecall
  • Plug
  • Plugin
  • Preference
  • Printer
  • PrinterModel
  • PrinterType
  • Problem
  • Problem_Supplier
  • Problem_Ticket
  • Problem_User
  • ProblemCost
  • ProblemTask
  • Profile
  • Profile_Reminder
  • Profile_RSSFeed
  • Profile_User
  • ProfileRight
  • Project
  • ProjectCost
  • ProjectState
  • ProjectTask
  • ProjectTask_Ticket
  • ProjectTaskTeam
  • ProjectTaskTemplate
  • ProjectTaskType
  • ProjectTeam
  • ProjectType
  • PurgeLogs
  • QueryExpression
  • QueryParam
  • QuerySubQuery
  • QueryUnion
  • QueuedNotification
  • Rack
  • RackModel
  • RackType
  • RegisteredID
  • Reminder
  • Reminder_User
  • Report
  • RequestType
  • Reservation
  • ReservationItem
  • RSSFeed
  • RSSFeed_User
  • Rule
  • RuleAction
  • RuleAsset
  • RuleAssetCollection
  • RuleCollection
  • RuleCriteria
  • RuleDictionnaryComputerModel
  • RuleDictionnaryComputerModelCollection
  • RuleDictionnaryComputerType
  • RuleDictionnaryComputerTypeCollection
  • RuleDictionnaryDropdown
  • RuleDictionnaryDropdownCollection
  • RuleDictionnaryManufacturer
  • RuleDictionnaryManufacturerCollection
  • RuleDictionnaryMonitorModel
  • RuleDictionnaryMonitorModelCollection
  • RuleDictionnaryMonitorType
  • RuleDictionnaryMonitorTypeCollection
  • RuleDictionnaryNetworkEquipmentModel
  • RuleDictionnaryNetworkEquipmentModelCollection
  • RuleDictionnaryNetworkEquipmentType
  • RuleDictionnaryNetworkEquipmentTypeCollection
  • RuleDictionnaryOperatingSystem
  • RuleDictionnaryOperatingSystemArchitecture
  • RuleDictionnaryOperatingSystemArchitectureCollection
  • RuleDictionnaryOperatingSystemCollection
  • RuleDictionnaryOperatingSystemServicePack
  • RuleDictionnaryOperatingSystemServicePackCollection
  • RuleDictionnaryOperatingSystemVersion
  • RuleDictionnaryOperatingSystemVersionCollection
  • RuleDictionnaryPeripheralModel
  • RuleDictionnaryPeripheralModelCollection
  • RuleDictionnaryPeripheralType
  • RuleDictionnaryPeripheralTypeCollection
  • RuleDictionnaryPhoneModel
  • RuleDictionnaryPhoneModelCollection
  • RuleDictionnaryPhoneType
  • RuleDictionnaryPhoneTypeCollection
  • RuleDictionnaryPrinter
  • RuleDictionnaryPrinterCollection
  • RuleDictionnaryPrinterModel
  • RuleDictionnaryPrinterModelCollection
  • RuleDictionnaryPrinterType
  • RuleDictionnaryPrinterTypeCollection
  • RuleDictionnarySoftware
  • RuleDictionnarySoftwareCollection
  • RuleImportComputer
  • RuleImportComputerCollection
  • RuleImportEntity
  • RuleImportEntityCollection
  • RuleMailCollector
  • RuleMailCollectorCollection
  • RuleRight
  • RuleRightCollection
  • RuleRightParameter
  • RuleSoftwareCategory
  • RuleSoftwareCategoryCollection
  • RuleTicket
  • RuleTicketCollection
  • SavedSearch
  • SavedSearch_Alert
  • SavedSearch_User
  • Search
  • Session
  • SingletonRuleList
  • SLA
  • SlaLevel
  • SlaLevel_Ticket
  • SlaLevelAction
  • SlaLevelCriteria
  • SLM
  • Software
  • SoftwareCategory
  • SoftwareLicense
  • SoftwareLicenseType
  • SoftwareVersion
  • SolutionTemplate
  • SolutionType
  • SsoVariable
  • Stat
  • State
  • Supplier
  • Supplier_Ticket
  • SupplierType
  • TaskCategory
  • TaskTemplate
  • Telemetry
  • Ticket
  • Ticket_Ticket
  • Ticket_User
  • TicketCost
  • TicketFollowup
  • TicketRecurrent
  • TicketSatisfaction
  • TicketTask
  • TicketTemplate
  • TicketTemplateHiddenField
  • TicketTemplateMandatoryField
  • TicketTemplatePredefinedField
  • TicketValidation
  • Timer
  • Toolbox
  • Transfer
  • Update
  • User
  • UserCategory
  • UserEmail
  • UserTitle
  • VirtualMachineState
  • VirtualMachineSystem
  • VirtualMachineType
  • Vlan
  • WifiNetwork
  • XHProf
  • XML

Interfaces

  • NotificationEventInterface
  • NotificationInterface

Traits

  • DCBreadcrumb

Exceptions

  • CommonDBConnexityItemNotFound
  • HTMLTableCellFatherCoherentHeader
  • HTMLTableCellFatherSameRow
  • HTMLTableCellWithoutFather
  • HTMLTableUnknownHeader
  • HTMLTableUnknownHeaders
  • HTMLTableUnknownHeadersOrder

Functions

  • __
  • __s
  • _n
  • _nx
  • _sn
  • _sx
  • _x
  • autoName
  • closeDBConnections
  • contructListFromTree
  • contructTreeFromList
  • countDistinctElementsInTable
  • countElementsInTable
  • countElementsInTableForEntity
  • countElementsInTableForMyEntities
  • exportArrayToDB
  • formatUserName
  • get_hour_from_sql
  • getAllDatasFromTable
  • getAncestorsOf
  • getDateCriteria
  • getDateRequest
  • getDbRelations
  • getEntitiesRestrictCriteria
  • getEntitiesRestrictRequest
  • getForeignKeyFieldForItemType
  • getForeignKeyFieldForTable
  • getItemForItemtype
  • getItemtypeForForeignKeyField
  • getItemTypeForTable
  • getNextItem
  • getPlural
  • getPreviousItem
  • getRealQueryForTreeItem
  • getSingular
  • getSonsAndAncestorsOf
  • getSonsOf
  • getTableForItemType
  • getTableNameForForeignKeyField
  • getTreeForItem
  • getTreeLeafValueName
  • getTreeValueCompleteName
  • getTreeValueName
  • getUserName
  • glpi_autoload
  • importArrayFromDB
  • isAPI
  • isCommandLine
  • isForeignKeyField
  • isIndex
  • isPluginItemType
  • regenerateTreeCompleteName
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class CommonDBTM

Common DataBase Table Manager Class - Persistent Object

CommonGLPI
Extended by CommonDBTM

Direct known subclasses

Alert, APIClient, CommonITILObject, CommonITILTask, Computer, Config, ConsumableItem, Contact, Contract, CronTask, CronTaskLog, Datacenter, AuthLDAP, DBConnection, DCRoom, DisplayPreference, Document, Enclosure, Glpi\Event, KnowbaseItem_Comment, KnowbaseItem_Revision, Link, Log, AuthLdapReplicate, MailCollector, Monitor, NetworkEquipment, Notification, NotificationEvent, NotificationSetting, NotificationSettingConfig, NotificationTemplate, NotImportedEmail, ObjectLock, AuthMail, OlaLevel_Ticket, PDU, Peripheral, Phone, Plugin, Printer, Profile, Project, PurgeLogs, QueuedNotification, CartridgeItem, Rack, Rule, RuleCollection, SavedSearch, SlaLevel_Ticket, SLM, Software, Supplier, TicketSatisfaction, Transfer, Certificate, User, CommonDBConnexity, CommonDBVisible, CommonDropdown

Indirect known subclasses

AutoUpdateSystem, Blacklist, CartridgeItem_PrinterModel, Fieldblacklist, FieldUnicity, Filesystem, FQDN, FQDNLabel, Group, Group_KnowbaseItem, Group_Problem, Group_Reminder, Group_RSSFeed, CartridgeItemType, Group_Ticket, Group_User, Holiday, Infocom, InterfaceType, IPAddress, IPAddress_IPNetwork, IPNetmask, IPNetwork, IPNetwork_Vlan, Certificate_Item, Item_DeviceBattery, Item_DeviceCase, Item_DeviceControl, Item_DeviceDrive, Item_DeviceFirmware, Item_DeviceGeneric, Item_DeviceGraphicCard, Item_DeviceHardDrive, Item_DeviceMemory, Item_DeviceMotherboard, CertificateType, Item_DeviceNetworkCard, Item_DevicePci, Item_DevicePowerSupply, Item_DeviceProcessor, Item_Devices, Item_DeviceSensor, Item_DeviceSimcard, Item_DeviceSoundCard, Item_Disk, Item_Enclosure, Change, Item_OperatingSystem, Item_Problem, Item_Project, Item_Rack, Item_Ticket, Itil_Project, ITILCategory, ITILFollowup, ITILSolution, KnowbaseItem, Change_Group, KnowbaseItem_Item, KnowbaseItem_Profile, KnowbaseItem_User, KnowbaseItemCategory, KnowbaseItemTranslation, LevelAgreement, LevelAgreementLevel, Line, LineOperator, LineType, Change_Item, Link_Itemtype, Location, Manufacturer, MonitorModel, MonitorType, Netpoint, Network, NetworkAlias, NetworkEquipmentModel, NetworkEquipmentType, Change_Problem, NetworkInterface, NetworkName, NetworkPort, NetworkPort_NetworkPort, NetworkPort_Vlan, NetworkPortAggregate, NetworkPortAlias, NetworkPortDialup, NetworkPortEthernet, NetworkPortFiberchannel, Change_Supplier, NetworkPortInstantiation, NetworkPortLocal, NetworkPortMigration, NetworkPortWifi, Notepad, Notification_NotificationTemplate, NotificationAjaxSetting, NotificationMailingSetting, NotificationTarget, NotificationTargetCartridgeItem, Change_Ticket, NotificationTargetCertificate, NotificationTargetChange, NotificationTargetCommonITILObject, NotificationTargetConsumableItem, NotificationTargetContract, NotificationTargetCrontask, NotificationTargetDBConnection, NotificationTargetFieldUnicity, NotificationTargetInfocom, NotificationTargetMailCollector, BlacklistedMailContent, Change_User, NotificationTargetObjectLock, NotificationTargetPlanningRecall, NotificationTargetProblem, NotificationTargetProject, NotificationTargetProjectTask, NotificationTargetReservation, NotificationTargetSavedsearch_Alert, NotificationTargetSoftwareLicense, NotificationTargetTicket, NotificationTargetUser, ChangeCost, NotificationTemplateTranslation, OLA, OlaLevel, OlaLevelAction, OlaLevelCriteria, OperatingSystem, OperatingSystemArchitecture, OperatingSystemEdition, OperatingSystemKernel, OperatingSystemKernelVersion, ChangeTask, OperatingSystemServicePack, OperatingSystemVersion, Pdu_Plug, PDU_Rack, PDUModel, PDUType, PeripheralModel, PeripheralType, PhoneModel, PhonePowerSupply, ChangeValidation, PhoneType, PlanningRecall, Plug, PrinterModel, PrinterType, Problem, Problem_Supplier, Problem_Ticket, Problem_User, ProblemCost, CommonDBChild, ProblemTask, Profile_Reminder, Profile_RSSFeed, Profile_User, ProfileRight, ProjectCost, ProjectState, ProjectTask, ProjectTask_Ticket, ProjectTaskTeam, CommonDBRelation, ProjectTaskTemplate, ProjectTaskType, ProjectTeam, ProjectType, RackModel, RackType, RegisteredID, Reminder, Reminder_User, RequestType, CommonDCModelDropdown, Reservation, ReservationItem, RSSFeed, RSSFeed_User, RuleAction, RuleAsset, RuleAssetCollection, RuleCriteria, RuleDictionnaryComputerModel, RuleDictionnaryComputerModelCollection, CommonDevice, RuleDictionnaryComputerType, RuleDictionnaryComputerTypeCollection, RuleDictionnaryDropdown, RuleDictionnaryDropdownCollection, RuleDictionnaryManufacturer, RuleDictionnaryManufacturerCollection, RuleDictionnaryMonitorModel, RuleDictionnaryMonitorModelCollection, RuleDictionnaryMonitorType, RuleDictionnaryMonitorTypeCollection, CommonDeviceModel, RuleDictionnaryNetworkEquipmentModel, RuleDictionnaryNetworkEquipmentModelCollection, RuleDictionnaryNetworkEquipmentType, RuleDictionnaryNetworkEquipmentTypeCollection, RuleDictionnaryOperatingSystem, RuleDictionnaryOperatingSystemArchitecture, RuleDictionnaryOperatingSystemArchitectureCollection, RuleDictionnaryOperatingSystemCollection, RuleDictionnaryOperatingSystemServicePack, RuleDictionnaryOperatingSystemServicePackCollection, CommonDeviceType, RuleDictionnaryOperatingSystemVersion, RuleDictionnaryOperatingSystemVersionCollection, RuleDictionnaryPeripheralModel, RuleDictionnaryPeripheralModelCollection, RuleDictionnaryPeripheralType, RuleDictionnaryPeripheralTypeCollection, RuleDictionnaryPhoneModel, RuleDictionnaryPhoneModelCollection, RuleDictionnaryPhoneType, RuleDictionnaryPhoneTypeCollection, Budget, CommonImplicitTreeDropdown, RuleDictionnaryPrinter, RuleDictionnaryPrinterCollection, RuleDictionnaryPrinterModel, RuleDictionnaryPrinterModelCollection, RuleDictionnaryPrinterType, RuleDictionnaryPrinterTypeCollection, RuleDictionnarySoftware, RuleDictionnarySoftwareCollection, RuleImportComputer, RuleImportComputerCollection, CommonITILActor, RuleImportEntity, RuleImportEntityCollection, RuleMailCollector, RuleMailCollectorCollection, RuleRight, RuleRightCollection, RuleRightParameter, RuleSoftwareCategory, RuleSoftwareCategoryCollection, RuleTicket, CommonITILCost, RuleTicketCollection, SavedSearch_Alert, SavedSearch_User, SLA, SlaLevel, SlaLevelAction, SlaLevelCriteria, SoftwareCategory, SoftwareLicense, SoftwareLicenseType, CommonITILValidation, SoftwareVersion, SolutionTemplate, SolutionType, SsoVariable, State, Supplier_Ticket, SupplierType, TaskCategory, TaskTemplate, Ticket, CommonTreeDropdown, Ticket_Ticket, Ticket_User, TicketCost, TicketFollowup, TicketRecurrent, TicketTask, TicketTemplate, TicketTemplateHiddenField, TicketTemplateMandatoryField, TicketTemplatePredefinedField, Computer_Item, TicketValidation, UserCategory, UserEmail, UserTitle, VirtualMachineState, VirtualMachineSystem, VirtualMachineType, Vlan, WifiNetwork, Computer_SoftwareLicense, Computer_SoftwareVersion, ComputerAntivirus, ComputerModel, BudgetType, ComputerType, ComputerVirtualMachine, Consumable, ConsumableItemType, Contact_Supplier, ContactType, Contract_Item, Contract_Supplier, ContractCost, ContractType, BusinessCriticity, DeviceBattery, DeviceBatteryModel, DeviceBatteryType, DeviceCase, DeviceCaseModel, DeviceCaseType, DeviceControl, DeviceControlModel, DeviceDrive, DeviceDriveModel, Calendar, DeviceFirmware, DeviceFirmwareModel, DeviceFirmwareType, DeviceGeneric, DeviceGenericModel, DeviceGenericType, DeviceGraphicCard, DeviceGraphicCardModel, DeviceHardDrive, DeviceHardDriveModel, Calendar_Holiday, DeviceMemory, DeviceMemoryModel, DeviceMemoryType, DeviceMotherboard, DeviceMotherBoardModel, DeviceNetworkCard, DeviceNetworkCardModel, DevicePci, DevicePciModel, DevicePowerSupply, CalendarSegment, DevicePowerSupplyModel, DeviceProcessor, DeviceProcessorModel, DeviceSensor, DeviceSensorModel, DeviceSensorType, DeviceSimcard, DeviceSimcardType, DeviceSoundCard, DeviceSoundCardModel, Cartridge, Document_Item, DocumentCategory, DocumentType, Domain, DropdownTranslation, EnclosureModel, Entity, Entity_KnowbaseItem, Entity_Reminder, Entity_RSSFeed
Located at commondbtm.class.php
Methods summary
public
# __construct( )

Constructor

Constructor

public static array
# getTablesOf( )

Get known tables

Get known tables

Deprecated

9.4.2

Returns

array
public static string
# getTable( string $classname = null )

Return the table used to store this object

Return the table used to store this object

Parameters

$classname
Force class (to avoid late_binding on inheritance)

Returns

string
public static
# forceTable( string $table )

force table value (used for config management for old versions)

force table value (used for config management for old versions)

Parameters

$table
name of the table to be forced
public static array
# getForeignKeyFieldsOf( )

Get known foreign keys

Get known foreign keys

Deprecated

9.4.2

Returns

array
public static
# getForeignKeyField( )
public static string
# getTableField( string $field, string|null $classname = null )

Return SQL path to access a field.

Return SQL path to access a field.

Parameters

$field
Name of the field (or SQL keyword like '*')
$classname
Forced classname (to avoid late_binding on inheritance)

Returns

string

Throws

InvalidArgumentException
LogicException
public boolean
# getFromDB( integer $ID )

Retrieve an item from the database

Retrieve an item from the database

Parameters

$ID
ID of the item to get

Returns

boolean
true if succeed else false
public
# getFromResultSet( array $rs )

Hydrate an object from a resultset row

Hydrate an object from a resultset row

Parameters

$rs
The row
public static CommonDBTM
# getFromIter( DBmysqlIterator $iter )

Generator to browse object from an iterator

Generator to browse object from an iterator

Parameters

$iter
Iterator instance

Returns

CommonDBTM

Since

9.2

See

http://php.net/manual/en/language.generators.syntax.php
public boolean|array
# getFromDBByCrit( array $crit )

Get an object using some criteria

Get an object using some criteria

Parameters

$crit
search criteria

Returns

boolean|array

Since

9.2
public boolean
# getFromDBByRequest( array $request )

Retrieve an item from the database by request. The request is an array similar to the one expected in DB::request().

Retrieve an item from the database by request. The request is an array similar to the one expected in DB::request().

Parameters

$request
expression

Returns

boolean
true if succeed else false

Since

9.3

See

DB::request()
public integer
# getID( )

Get the identifier of the current item

Get the identifier of the current item

Returns

integer
ID
public
# post_getFromDB( )

Actions done at the end of the getFromDB function

Actions done at the end of the getFromDB function

public static
# unsetUndisclosedFields( array & $fields )

Actions done to not show some fields when geting a single item from API calls

Actions done to not show some fields when geting a single item from API calls

Parameters

$fields
Fields to unset undiscloseds
public array
# find( array $condition = [], array|string $order = [], integer $limit = null )

Retrieve all items from the database

Retrieve all items from the database

Parameters

$condition
condition used to search if needed (empty get all) (default '')
$order
order field if needed (default '')
$limit
limit retrieved data if needed (default '')

Returns

array
all retrieved data in a associative array by id

Since

9.4 string condition is deprecated
public static string
# getIndexName( )

Get the name of the index field

Get the name of the index field

Returns

string
name of the index field
public boolean
# getEmpty( )

Get an empty item

Get an empty item

Returns

boolean
true if succeed else false
public
# post_getEmpty( )

Actions done at the end of the getEmpty function

Actions done at the end of the getEmpty function

public array
# getLogTypeID( )

Get type to register log on

Get type to register log on

Returns

array
array of type + ID

Since

0.83
public
# updateInDB( string[] $updates, string[] $oldvalues = [] )

Update the item in the database

Update the item in the database

Parameters

$updates
fields to update
$oldvalues
array of old values of the updated fields
public integer|boolean
# addToDB( )

Add an item to the database

Add an item to the database

Returns

integer|boolean
new ID of the item is insert successfull else false
public boolean
# restoreInDB( )

Restore item = set deleted flag to 0

Restore item = set deleted flag to 0

Returns

boolean
true if succeed else false
public boolean
# deleteFromDB( boolean $force = 0 )

Mark deleted or purge an item in the database

Mark deleted or purge an item in the database

Parameters

$force

force the purge of the item (not used if the table do not have a deleted field) (default 0)

Returns

boolean
true if succeed else false
public
# cleanHistory( )

Clean data in the tables which have linked the deleted item

Clean data in the tables which have linked the deleted item

public
# cleanRelationData( )

Clean data in the tables which have linked the deleted item Clear 1/N Relation

Clean data in the tables which have linked the deleted item Clear 1/N Relation

public
# post_deleteFromDB( )

Actions done after the DELETE of the item in the database

Actions done after the DELETE of the item in the database

public
# cleanDBonPurge( )

Actions done when item is deleted from the database

Actions done when item is deleted from the database

protected
# deleteChildrenAndRelationsFromDb( array $relations_classes )

Delete children items and relation with other items from database.

Delete children items and relation with other items from database.

Parameters

$relations_classes

List of classname on which deletion will be done Classes needs to extends CommonDBConnexity.

public
# cleanTranslations( )

Clean translations associated to a dropdown

Clean translations associated to a dropdown

Since

0.85
public
# cleanRelationTable( )

Clean the date in the relation tables for the deleted item Clear N/N Relation

Clean the date in the relation tables for the deleted item Clear N/N Relation

public
# cleanDBonMarkDeleted( )

Actions done when item flag deleted is set to an item

Actions done when item flag deleted is set to an item

protected
# saveInput( )

Save the input data in the Session

Save the input data in the Session

Since

0.84
protected
# clearSavedInput( )

Clear the saved data stored in the session

Clear the saved data stored in the session

Since

0.84
protected array
# restoreInput( array $default = [] )

Get the data saved in the session

Get the data saved in the session

Parameters

$default
Array of value used if session is empty

Returns

array
Array of value

Since

0.84
public integer
# add( array $input, array $options = [], boolean $history = true )

Add an item in the database with all it's items.

Add an item in the database with all it's items.

Parameters

$input
the _POST vars returned by the item form when press add
$options

with the insert options - unicity_message : do not display message if item it a duplicate (default is yes)

$history
do history log ? (true by default)

Returns

integer
the new ID of the added item (or false if fail)
public string
# getLink( array $options = [] )

Get the link to an item

Get the link to an item

Parameters

$options

array of options - comments : boolean / display comments - complete : boolean / display completename instead of name - additional : boolean / display additionals information - linkoption : string / additional options to add to

Returns

string
HTML link
public string
# getLinkURL( )

Get the link url to an item

Get the link url to an item

Returns

string
HTML link
public
# addMessageOnAddAction( )

Add a message on add action

Add a message on add action

public array
# addNeededInfoToInput( array $input )

Add needed information to $input (example entities_id)

Add needed information to $input (example entities_id)

Parameters

$input
datas used to add the item

Returns

array
the modified $input array

Since

0.84
public array
# prepareInputForAdd( array $input )

Prepare input datas for adding the item

Prepare input datas for adding the item

Parameters

$input
datas used to add the item

Returns

array
the modified $input array
public
# post_addItem( )

Actions done after the ADD of the item in the database

Actions done after the ADD of the item in the database

public boolean
# update( array $input, boolean $history = 1, array $options = [] )

Update some elements of an item in the database.

Update some elements of an item in the database.

Parameters

$input
the _POST vars returned by the item form when press update
$history
do history log ? (default 1)
$options
with the insert options

Returns

boolean
true on success
protected
# forwardEntityInformations( )

Forward entity information to linked items

Forward entity information to linked items

public
# addMessageOnUpdateAction( )

Add a message on update action

Add a message on update action

public array
# prepareInputForUpdate( array $input )

Prepare input datas for updating the item

Prepare input datas for updating the item

Parameters

$input
data used to update the item

Returns

array
the modified $input array
public
# post_updateItem( boolean $history = 1 )

Actions done after the UPDATE of the item in the database

Actions done after the UPDATE of the item in the database

Parameters

$history
store changes history ? (default 1)
public
# pre_updateInDB( )

Actions done before the UPDATE of the item in the database

Actions done before the UPDATE of the item in the database

public boolean
# delete( array $input, boolean $force = 0, boolean $history = 1 )

Delete an item in the database.

Delete an item in the database.

Parameters

$input
the _POST vars returned by the item form when press delete
$force
force deletion (default 0)
$history
do history log ? (default 1)

Returns

boolean
true on success
public
# post_deleteItem( )

Actions done after the DELETE (mark as deleted) of the item in the database

Actions done after the DELETE (mark as deleted) of the item in the database

public
# post_purgeItem( )

Actions done after the PURGE of the item in the database

Actions done after the PURGE of the item in the database

public
# addMessageOnDeleteAction( )

Add a message on delete action

Add a message on delete action

public
# addMessageOnPurgeAction( )

Add a message on purge action

Add a message on purge action

public boolean
# pre_deleteItem( )

Actions done before the DELETE of the item in the database / Maybe used to add another check for deletion

Actions done before the DELETE of the item in the database / Maybe used to add another check for deletion

Returns

boolean
true if item need to be deleted else false
public boolean
# restore( array $input, boolean $history = 1 )

Restore an item put in the trashbin in the database.

Restore an item put in the trashbin in the database.

Parameters

$input
the _POST vars returned by the item form when press restore
$history
do history log ? (default 1)

Returns

boolean
true on success
public
# post_restoreItem( )

Actions done after the restore of the item

Actions done after the restore of the item

public
# addMessageOnRestoreAction( )

Add a message on restore action

Add a message on restore action

public
# reset( )

Reset fields of the item

Reset fields of the item

public boolean
# canAddItem( string $type )

Have I the global right to add an item for the Object May be overloaded if needed (ex Ticket)

Have I the global right to add an item for the Object May be overloaded if needed (ex Ticket)

Parameters

$type
itemtype of object to add

Returns

boolean

Since

0.83
public static boolean
# canCreate( )

Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)

Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)

Returns

boolean
public static boolean
# canDelete( )

Have I the global right to "delete" the Object

Have I the global right to "delete" the Object

May be overloaded if needed

Returns

boolean
public static boolean
# canPurge( )

Have I the global right to "purge" the Object

Have I the global right to "purge" the Object

May be overloaded if needed

Returns

boolean
public static boolean
# canUpdate( )

Have I the global right to "update" the Object

Have I the global right to "update" the Object

Default is calling canCreate May be overloaded if needed

Returns

boolean
public boolean
# canCreateItem( )

Have I the right to "create" the Object

Have I the right to "create" the Object

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns

boolean
public boolean
# canUpdateItem( )

Have I the right to "update" the Object

Have I the right to "update" the Object

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns

boolean
public boolean
# canDeleteItem( )

Have I the right to "delete" the Object

Have I the right to "delete" the Object

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns

boolean
public boolean
# canPurgeItem( )

Have I the right to "purge" the Object

Have I the right to "purge" the Object

Default is true and check entity if the objet is entity assign

Returns

boolean

Since

0.85
public static boolean
# canView( )

Have I the global right to "view" the Object

Have I the global right to "view" the Object

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns

boolean
public boolean
# canViewItem( )

Have I the right to "view" the Object May be overloaded if needed

Have I the right to "view" the Object May be overloaded if needed

Returns

boolean
public boolean
# canEdit( integer $ID )

Have i right to see action button

Have i right to see action button

Parameters

$ID
ID to check

Returns

boolean

Since

0.85
public boolean
# canUnrecurs( )

Can I change recursive flag to false check if there is "linked" object in another entity

Can I change recursive flag to false check if there is "linked" object in another entity

May be overloaded if needed

Returns

boolean
public boolean
# canMassiveAction( string $action, integer $field, string $value )

check if this action can be done on this field of this item by massive actions

check if this action can be done on this field of this item by massive actions

Parameters

$action
name of the action
$field
id of the field
$value
value of the field

Returns

boolean

Since

0.83
public boolean
# showDates( array $options = [] )

Parameters

$options
Options

Returns

boolean

Since

9.1
public
# showFormButtons( array $options = [] )

Display a 2 columns Footer for Form buttons Close the form is user can edit

Display a 2 columns Footer for Form buttons Close the form is user can edit

Parameters

$options

array of possible options: - withtemplate : 1 for newtemplate, 2 for newobject from template - colspan for each column (default 2) - candel : set to false to hide "delete" button - canedit : set to false to hide all buttons - addbuttons : array of buttons to add

public integer|
# initForm( integer $ID, array $options = [] )

Initialize item and check right before managing the edit form

Initialize item and check right before managing the edit form

Parameters

$ID
ID of the item/template
$options

Array of possible options: - withtemplate : 1 for newtemplate, 2 for newobject from template

Returns

integer|
value of withtemplate option (exit of no right)

Since

0.84
public
# showFormHeader( array $options = [] )

Display a 2 columns Header 1 for ID, 1 for recursivity menu Open the form is user can edit

Parameters

$options

array of possible options: - target for the Form - withtemplate : 1 for newtemplate, 2 for newobject from template - colspan for each column (default 2) - formoptions string (javascript p.e.) - canedit boolean edit mode of form ? - formtitle specific form title - noid Set to true if ID should not be append (eg. already done in formtitle)

public static boolean
# isNewID( integer $ID )

is the parameter ID must be considered as new one ? Default is empty of <0 may be overriden (for entity for example)

is the parameter ID must be considered as new one ? Default is empty of <0 may be overriden (for entity for example)

Parameters

$ID
ID of the item (-1 if new item)

Returns

boolean

Overrides

CommonGLPI::isNewID()
public boolean
# isNewItem( )

is the current object a new one

is the current object a new one

Returns

boolean

Since

0.83

Overrides

CommonGLPI::isNewItem()
public boolean
# can( integer $ID, mixed $right, array & $input = null )

Check right on an item

Check right on an item

Parameters

$ID
ID of the item (-1 if new item)
$right
Right to check : r / w / recursive / READ / UPDATE / DELETE
$input
array of input data (used for adding item) (default NULL)

Returns

boolean
public
# check( integer $ID, mixed $right, array & $input = null )

Check right on an item with block

Check right on an item with block

Parameters

$ID
ID of the item (-1 if new item)
$right
Right to check : r / w / recursive
$input
array of input data (used for adding item) (default NULL)
public boolean
# checkEntity( boolean $recursive = false )

Check if have right on this entity

Check if have right on this entity

Parameters

$recursive

set true to accept recursive items of ancestors of active entities (View case for example) (default false)

Returns

boolean

Since

0.85
public
# checkGlobal( mixed $right )

Check global right on an object

Check global right on an object

Parameters

$right
Right to check : c / r / w / d
public
# canGlobal( mixed $right )

Get global right on an object

Get global right on an object

Parameters

$right
Right to check : c / r / w / d / READ / UPDATE / CREATE / DELETE
public integer
# getEntityID( )

Get the ID of entity assigned to the object

Get the ID of entity assigned to the object

Can be overloaded (ex : infocom)

Returns

integer
ID of the entity
public boolean
# isEntityAssign( )

Is the object assigned to an entity

Is the object assigned to an entity

Can be overloaded (ex : infocom)

Returns

boolean
public boolean
# maybeRecursive( )

Is the object may be recursive

Is the object may be recursive

Can be overloaded (ex : infocom)

Returns

boolean
public boolean
# isRecursive( )

Is the object recursive

Is the object recursive

Can be overloaded (ex : infocom)

Returns

boolean
public boolean
# maybeDeleted( )

Is the object may be deleted

Is the object may be deleted

Returns

boolean
public boolean
# isDeleted( )

Is the object deleted

Is the object deleted

Returns

boolean
public boolean
# maybeActive( )

Can object be activated

Can object be activated

Returns

boolean

Since

9.2
public boolean
# isActive( )

Is the object active

Is the object active

Returns

boolean

Since

9.2
public boolean
# maybeTemplate( )

Is the object may be a template

Is the object may be a template

Returns

boolean
public boolean
# isTemplate( )

Is the object a template

Is the object a template

Returns

boolean
public boolean
# maybeDynamic( )

Can the object be dynamic

Can the object be dynamic

Returns

boolean

Since

0.84
public boolean
# useDeletedToLockIfDynamic( )

Use deleted field in case of dynamic management to lock ?

Use deleted field in case of dynamic management to lock ?

need to be overriden if object need to use standard deleted management (Computer...)

Returns

boolean

Since

0.84
public boolean
# isDynamic( )

Is an object dynamic or not

Is an object dynamic or not

Returns

boolean

Since

0.84
public boolean
# maybePrivate( )

Is the object may be private

Is the object may be private

Returns

boolean
public boolean
# isPrivate( )

Is the object private

Is the object private

Returns

boolean
public boolean
# maybeLocated( )

Can object have a location

Can object have a location

Returns

boolean

Since

9.3
public array
# getLinkedItems( )

Return the linked items (in computers_items)

Return the linked items (in computers_items)

Returns

array
an array of linked items like array('Computer' => array(1,2), 'Printer' => array(5,6))

Since

0.84.4
public integer
# getLinkedItemsCount( )

Return the count of linked items (in computers_items)

Return the count of linked items (in computers_items)

Returns

integer
number of linked items

Since

0.84.4
public mixed
# getField( string $field )

Return a field Value if exists

Return a field Value if exists

Parameters

$field
field name

Returns

mixed
value of the field / false if not exists
public boolean
# isField( string $field )

Determine if a field exists

Determine if a field exists

Parameters

$field
field name

Returns

boolean
public string
# getComments( )

Get comments of the Object

Get comments of the Object

Returns

string
comments of the object in the current language (HTML)
public static string
# getNameField( )

Returns

string

Since

0.84

Get field used for name


public static string
# getCompleteNameField( )

Returns

string

Since

0.84

Get field used for completename


public string
# getRawName( )

Get raw name of the object Maybe overloaded

Get raw name of the object Maybe overloaded

Returns

string

Since

0.85

See

CommonDBTM::getNameField
public string
# getRawCompleteName( )

Get raw completename of the object Maybe overloaded

Get raw completename of the object Maybe overloaded

Returns

string

Since

0.85

See

CommonDBTM::getCompleteNameField
public string
# getName( array $options = [] )

Get the name of the object

Get the name of the object

Parameters

$options

array of options - comments : boolean / display comments - complete : boolean / display completename instead of name - additional : boolean / display aditionals information

Returns

string
name of the object in the current language

See

CommonDBTM::getRawCompleteName
CommonDBTM::getRawName
public string
# getPreAdditionalInfosForName( )

Get additionals information to add before name

Get additionals information to add before name

Returns

string
string to add

Since

0.84
public string
# getPostAdditionalInfosForName( )

Get additionals information to add after name

Get additionals information to add after name

Returns

string
string to add

Since

0.84
public string
# getNameID( array $options = [] )

Get the name of the object with the ID if the config is set Should Not be overloaded (overload getName() instead)

Get the name of the object with the ID if the config is set Should Not be overloaded (overload getName() instead)

Parameters

$options

array of options - comments : boolean / display comments - complete : boolean / display completename instead of name - additional : boolean / display aditionals information - forceid : boolean override config and display item's ID (false by default)

Returns

string
name of the object in the current language

See

CommonDBTM::getName
final public array
# searchOptions( )

Get the Search options for the given Type If you want to work on search options, @see CommonDBTM::rawSearchOptions

Get the Search options for the given Type If you want to work on search options, @see CommonDBTM::rawSearchOptions

Returns

array
an indexed array of search options

See

https://glpi-developer-documentation.rtfd.io/en/master/devapi/search.html
public array
# rawSearchOptions( )

Provides search options configuration. Do not rely directly on this, @see CommonDBTM::searchOptions instead.

Provides search options configuration. Do not rely directly on this, @see CommonDBTM::searchOptions instead.

Returns

array
a not indexed array of search options

Since

9.3

This should be overloaded in Class


See

https://glpi-developer-documentation.rtfd.io/en/master/devapi/search.html
public static array
# getSearchOptionsToAdd( string $itemtype = null )

Summary of getSearchOptionsToAdd

Summary of getSearchOptionsToAdd

Parameters

$itemtype
Item type, defaults to null

Returns

array

Since

9.2
public static
# getMassiveActionsForItemtype( array & $actions, string $itemtype, boolean $is_deleted = 0, CommonDBTM $checkitem = null )

Get all the massive actions available for the current class regarding given itemtype

Get all the massive actions available for the current class regarding given itemtype

Parameters

$actions
array of the actions to update
$itemtype
the type of the item for which we want the actions
$is_deleted
(default 0)
$checkitem
(default NULL)

Returns


(update is set inside $actions)

Since

0.85
public static boolean
# showMassiveActionsSubForm( MassiveAction $ma )

Class-specific method used to show the fields to specify the massive action

Class-specific method used to show the fields to specify the massive action

Parameters

$ma
the current massive action object

Returns

boolean
false if parameters displayed ?

Since

0.85
public static
# processMassiveActionsForOneItemtype( MassiveAction $ma, CommonDBTM $item, array $ids )

Class specific execution of the massive action (new system) by itemtypes

Class specific execution of the massive action (new system) by itemtypes

Parameters

$ma
the current massive action object
$item
the item on which apply the massive action
$ids
an array of the ids of the item on which apply the action

Returns


(direct submit to $ma object)

Since

0.85
public array
# getForbiddenStandardMassiveAction( )

Get the standard massive actions which are forbidden

Get the standard massive actions which are forbidden

Returns

array
an array of massive actions

Since

0.84

This should be overloaded in Class


public array
# getSpecificMassiveActions( object $checkitem = null )

Get the specific massive actions

Get the specific massive actions

Parameters

$checkitem
link item to check right (default NULL)

Returns

array
an array of massive actions

Since

0.84

This should be overloaded in Class


public static
# dropdown( array $options = [] )

Print out an HTML "" for a dropdown

This should be overloaded in Class

Parameters

$options

array of possible options: Parameters which could be used in options array : - name : string / name of the select (default is depending itemtype) - value : integer / preselected value (default 0) - comments : boolean / is the comments displayed near the dropdown (default true) - entity : integer or array / restrict to a defined entity or array of entities (default -1 : no restriction) - toupdate : array / Update a specific item on select change on dropdown (need value_fieldname, to_update, url (see Ajax::updateItemOnSelectEvent for information) and may have moreparams) - used : array / Already used items ID: not to display in dropdown (default empty)

Returns


display the dropdown
public array
# getSearchOptionByField( string $field, string $value, string $table = '' )

Return a search option by looking for a value of a specific field and maybe a specific table

Return a search option by looking for a value of a specific field and maybe a specific table

Parameters

$field
the field in which looking for the value (for example : table, name, etc)
$value
the value to look for in the field
$table
the table (default '')

Returns

array
the search option array, or an empty array if not found
public array
# getOptions( )

Get search options

Get search options

Returns

array
the search option array

Since

0.85
public mixed
# getSearchOptionIDByField( string $field, string $value, string $table = '' )

Return a search option ID by looking for a value of a specific field and maybe a specific table

Return a search option ID by looking for a value of a specific field and maybe a specific table

Parameters

$field
the field in which looking for the value (for example : table, name, etc)
$value
the value to look for in the field
$table
the table (default '')

Returns

mixed
the search option id, or -1 if not found

Since

0.83
public
# filterValues( boolean $display = true )

Check float and decimal values

Check float and decimal values

Parameters

$display
display or not messages in and addAfterRedirect (true by default)
public boolean
# checkSpecificValues( string $datatype, array & $value )

Add more check for values

Add more check for values

Parameters

$datatype
datatype of the value
$value
value to check (pass by reference)

Returns

boolean
true if value is ok, false if not
public array
# getUnicityFieldsToDisplayInErrorMessage( )

Get fields to display in the unicity error message

Get fields to display in the unicity error message

Returns

array
an array which contains field => label
public
# getUnallowedFieldsForUnicity( )
public string
# getUnicityErrorMessage( array $msgs, array $unicity, array $doubles )

Build an unicity error message

Build an unicity error message

Parameters

$msgs
the string not transleted to be display on the screen, or to be sent in a notification
$unicity
the unicity criterion that failed to match
$doubles
the items that are already present in DB

Returns

string
public boolean
# checkUnicity( boolean $add = false, array $options = [] )

Check field unicity before insert or update

Check field unicity before insert or update

Parameters

$add
true for insert, false for update (false by default)
$options
array

Returns

boolean
true if item can be written in DB, false if not
public boolean
# deleteByCriteria( array $crit = [], boolean $force = 0, boolean $history = 1 )

Clean all infos which match some criteria

Clean all infos which match some criteria

Parameters

$crit
array of criteria (ex array('is_active'=>'1'))
$force
force purge not on put in trashbin (default 0)
$history
do history log ? (true by default)

Returns

boolean
public static integer
# getItemEntity( string $itemtype, integer $items_id )

get the Entity of an Item

get the Entity of an Item

Parameters

$itemtype
item type
$items_id
id of the item

Returns

integer
ID of the entity or -1
public static string
# getSpecificValueToDisplay( string $field, string|array $values, array $options = [] )

display a specific field value

display a specific field value

Parameters

$field
name of the field
$values
with the value to display or a Single value
$options
Array of options

Returns

string
the string to display

Since

0.83
public string
# getValueToDisplay( integer|string|array $field_id_or_search_options, mixed $values, array $options = [] )

display a field using standard system

display a field using standard system

Parameters

$field_id_or_search_options

id of the search option field or field name or search option array

$values
value to display
$options

array of possible options: Parameters which could be used in options array : - comments : boolean / is the comments displayed near the value (default false) - any others options passed to specific display method

Returns

string
the string to display

Since

0.83
public static string
# getSpecificValueToSelect( string $field, string $name = '', string|array $values = '', array $options = [] )

display a specific field selection system

display a specific field selection system

Parameters

$field
name of the field
$name
name of the select (if empty use linkfield) (default '')
$values
with the value to select or a Single value (default '')
$options
aArray of options

Returns

string
the string to display

Since

0.83
public string
# getValueToSelect( integer|string|array $field_id_or_search_options, string $name = '', mixed $values = '', array $options = [] )

Select a field using standard system

Select a field using standard system

Parameters

$field_id_or_search_options

id of the search option field or field name or search option array

$name

name of the select (if empty use linkfield) (default '')

$values

default value to display (default '')

$options

array of possible options: Parameters which could be used in options array : - comments : boolean / is the comments displayed near the value (default false) - any others options passed to specific display method

Returns

string
the string to display

Since

0.83
public static false|
# listTemplates( string $itemtype, string $target, boolean $add = 0 )

Parameters

$itemtype
Item type
$target
Target
$add
(default 0)

Returns

false|
public static
# addForwardEntity( string $for_itemtype, string $to_itemtype )

Specificy a plugin itemtype for which entities_id and is_recursive should be forwarded

Specificy a plugin itemtype for which entities_id and is_recursive should be forwarded

Parameters

$for_itemtype
change of entity for this itemtype will be forwarder
$to_itemtype
change of entity will affect this itemtype

Since

0.83
public static boolean
# isEntityForwardTo( string $itemtype )

Is entity informations forward To ?

Is entity informations forward To ?

Parameters

$itemtype
itemtype to check

Returns

boolean

Since

0.84
public array
# getRights( string $interface = 'central' )

Get rights for an item _ may be overload by object

Get rights for an item _ may be overload by object

Parameters

$interface
(defalt 'central')

Returns

array
array of rights to display

Since

0.85
public static array
# generateLinkContents( string $link, CommonDBTM $item )

Generate link

Generate link

Parameters

$link
original string content
$item
item used to make replacements

Returns

array
of link contents (may have several when item have several IP / MAC cases)

Since

9.1
public array
# addFiles( array $input, array $options = [] )

add files (from $this->input['_filename']) to an CommonDBTM object create document if needed create link from document to CommonDBTM object

add files (from $this->input['_filename']) to an CommonDBTM object create document if needed create link from document to CommonDBTM object

Parameters

$input
Input data
$options

array with theses keys - force_update (default false) update the content field of the object - content_field (default content) the field who receive the main text (with images)

Returns

array
the input param transformed

Since

9.2
public string
# getAutofillMark( string $field, array $options, string $value = null )

Get autofill mark for/from templates

Get autofill mark for/from templates

Parameters

$field
Field name
$options
Withtemplate parameter
$value
Optional value (if field to check is not part of current itemtype)

Returns

string
private
# assetBusinessRules( boolean $condition )

Manage business rules for assets

Manage business rules for assets

Parameters

$condition
the condition (RuleAsset::ONADD or RuleAsset::ONUPDATE)

Since

9.4
public static array
# checkTemplateEntity( array $data, string $parent_id, $parent_itemtype )

Correct entity id if needed when cloning a template

Correct entity id if needed when cloning a template

Parameters

$data
$parent_id
$parent_field
$parent_itemtype

Returns

array
Methods inherited from CommonGLPI
addDefaultFormTab(), addStandardTab(), createTabEntry(), defineAllTabs(), defineTabs(), display(), displayStandardTab(), displayTabContentForItem(), getAdditionalMenuContent(), getAdditionalMenuLinks(), getAdditionalMenuOptions(), getAvailableDisplayOptions(), getDisplayOptions(), getDisplayOptionsLink(), getErrorMessage(), getForbiddenActionsForMenu(), getFormURL(), getFormURLWithID(), getMenuContent(), getMenuName(), getMenuShorcut(), getOtherTabs(), getSearchURL(), getTabNameForItem(), getTabsURL(), getType(), getTypeName(), isLayoutExcludedPage(), isLayoutWithMain(), redirectToList(), registerStandardTab(), showDebugInfo(), showDislayOptions(), showNavigationHeader(), showPrimaryForm(), showTabsContent(), updateDisplayOptions()
Properties summary
public mixed[] $fields

Data fields of the Item.

Data fields of the Item.

# []
public boolean $dohistory

Flag to determine whether or not changes must be logged into history.

Flag to determine whether or not changes must be logged into history.

# false
public string[] $history_blacklist

List of fields that must not be taken into account when logging history or computating last modification date.

List of fields that must not be taken into account when logging history or computating last modification date.

# []
public boolean $auto_message_on_action

Flag to determine whether or not automatic messages must be generated on actions.

Flag to determine whether or not automatic messages must be generated on actions.

# true
public boolean $no_form_page

Flag to determine whether or not a link to item form can be automatically generated via self::getLink() method.

Flag to determine whether or not a link to item form can be automatically generated via self::getLink() method.

# false
protected static boolean $notable

Flag to determine whether or not table name of item can be automatically generated via self::getTable() method.

Flag to determine whether or not table name of item can be automatically generated via self::getTable() method.

# false
public string[] $additional_fields_for_dictionnary

List of fields that must not be taken into account for dictionnary processing.

List of fields that must not be taken into account for dictionnary processing.

# []
protected static string[] $forward_entity_to

List of linked item types on which entities informations should be forwarded on update.

List of linked item types on which entities informations should be forwarded on update.

# []
protected string $fkfield

Foreign key field cache : set dynamically calling getForeignKeyField

Foreign key field cache : set dynamically calling getForeignKeyField

Todo

Remove this variable as it is not used ?
# ""
protected array $searchopt

Search option of item. Initialized on first call to self::getOptions() and used as cache.

Search option of item. Initialized on first call to self::getOptions() and used as cache.

Todo

Should be removed and replaced by real cache usage.
# false
public string $taborientation

Tab orientation : horizontal or vertical.

Tab orientation : horizontal or vertical.

# 'vertical'
public boolean $get_item_to_display_tab

Need to get item to show tab

Need to get item to show tab

# true
protected static array $plugins_forward_entity

List of linked item types from plugins on which entities informations should be forwarded on update.

List of linked item types from plugins on which entities informations should be forwarded on update.

# []
public static string $rightname

Rightname used to check rights to do actions on item.

Rightname used to check rights to do actions on item.

# ''
protected boolean $usenotepad

Flag to determine whether or not table name of item has a notepad.

Flag to determine whether or not table name of item has a notepad.

# false
public boolean $notificationqueueonaction

Flag to determine whether or not notification queu should be flushed immediately when an action is performed on item.

Flag to determine whether or not notification queu should be flushed immediately when an action is performed on item.

# false
protected static string[] $tables_of

Computed/forced values of classes tables.

Computed/forced values of classes tables.

# []
protected static string[] $foreign_key_fields_of

Computed values of classes foreign keys.

Computed values of classes foreign keys.

# []
public static array $undisclosedFields

Fields to remove when querying data with api

Fields to remove when querying data with api

# []
Properties inherited from CommonGLPI
$displaylist, $othertabs, $showdebug, $type
GLPI version 9.4.7 API API documentation generated by ApiGen