Class CommonDBTM
Common DataBase Table Manager Class - Persistent Object
- CommonGLPI
-
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, CommonDropdownIndirect 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
public
|
|
public static
array
|
|
public static
string
|
|
public static
|
|
public static
array
|
|
public static
|
|
public static
string
|
|
public
boolean
|
|
public
|
|
public static
|
|
public
boolean|array
|
|
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(). |
public
integer
|
|
public
|
|
public static
|
#
unsetUndisclosedFields( array & $fields )
Actions done to not show some fields when geting a single item from API calls |
public
array
|
|
public static
string
|
|
public
boolean
|
|
public
|
|
public
array
|
|
public
|
|
public
integer|boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
public
|
#
cleanRelationData( )
Clean data in the tables which have linked the deleted item Clear 1/N Relation |
public
|
|
public
|
|
protected
|
#
deleteChildrenAndRelationsFromDb( array $relations_classes )
Delete children items and relation with other items from database. |
public
|
|
public
|
#
cleanRelationTable( )
Clean the date in the relation tables for the deleted item Clear N/N Relation |
public
|
|
protected
|
|
protected
|
|
protected
array
|
|
public
integer
|
|
public
string
|
|
public
string
|
|
public
|
|
public
array
|
|
public
array
|
|
public
|
|
public
boolean
|
|
protected
|
|
public
|
|
public
array
|
|
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
#
pre_deleteItem( )
Actions done before the DELETE of the item in the database / Maybe used to add another check for deletion |
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
#
canAddItem( string $type )
Have I the global right to add an item for the Object May be overloaded if needed (ex Ticket) |
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public static
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
#
canUnrecurs( )
Can I change recursive flag to false check if there is "linked" object in another entity |
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 |
public
boolean
|
|
public
|
#
showFormButtons( array $options = [] )
Display a 2 columns Footer for Form buttons Close the form is user can edit |
public
integer|
|
|
public
|
|
public static
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
integer
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
array
|
|
public
integer
|
|
public
mixed
|
|
public
boolean
|
|
public
string
|
|
public static
string
|
|
public static
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
final public
array
|
#
searchOptions( )
Get the Search options for the given Type If you want to work on search options, @see CommonDBTM::rawSearchOptions |
public
array
|
#
rawSearchOptions( )
Provides search options configuration. Do not rely directly on this, @see CommonDBTM::searchOptions instead. |
public static
array
|
|
public static
|
#
getMassiveActionsForItemtype( array & $actions, string $itemtype, boolean $is_deleted = 0,
Get all the massive actions available for the current class regarding given itemtype |
public static
boolean
|
#
showMassiveActionsSubForm(
Class-specific method used to show the fields to specify the massive action |
public static
|
#
processMassiveActionsForOneItemtype(
Class specific execution of the massive action (new system) by itemtypes |
public
array
|
|
public
array
|
|
public static
|
|
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 |
public
array
|
|
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 |
public
|
|
public
boolean
|
|
public
array
|
|
public
|
|
public
string
|
#
getUnicityErrorMessage( array $msgs, array $unicity, array $doubles )
Build an unicity error message |
public
boolean
|
#
checkUnicity( boolean $add = false, array $options = [] )
Check field unicity before insert or update |
public
boolean
|
#
deleteByCriteria( array $crit = [], boolean $force = 0, boolean $history = 1 )
Clean all infos which match some criteria |
public static
integer
|
|
public static
string
|
#
getSpecificValueToDisplay( string $field, string|array $values, array $options = [] )
display a specific field value |
public
string
|
#
getValueToDisplay( integer|string|array $field_id_or_search_options, mixed $values, array $options = [] )
display a field using standard system |
public static
string
|
#
getSpecificValueToSelect( string $field, string $name = '', string|array $values = '', array $options = [] )
display a specific field selection system |
public
string
|
#
getValueToSelect( integer|string|array $field_id_or_search_options, string $name = '', mixed $values = '', array $options = [] )
Select a field using standard system |
public static
false|
|
|
public static
|
#
addForwardEntity( string $for_itemtype, string $to_itemtype )
Specificy a plugin itemtype for which entities_id and is_recursive should be forwarded |
public static
boolean
|
|
public
array
|
|
public static
array
|
|
public
array
|
|
public
string
|
#
getAutofillMark( string $field, array $options, string $value = null )
Get autofill mark for/from templates |
private
|
|
public static
array
|
#
checkTemplateEntity( array $data, string $parent_id, $parent_itemtype )
Correct entity id if needed when cloning a template |
public
mixed[]
|
$fields
Data fields of the Item. |
#
[]
|
public
boolean
|
$dohistory
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. |
#
[]
|
public
boolean
|
$auto_message_on_action
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. |
#
false
|
protected static
boolean
|
$notable
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. |
#
[]
|
protected static
string[]
|
$forward_entity_to
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 |
#
""
|
protected
array
|
$searchopt
Search option of item. Initialized on first call to |
#
false
|
public
string
|
$taborientation
Tab orientation : horizontal or vertical. |
#
'vertical'
|
public
boolean
|
$get_item_to_display_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. |
#
[]
|
public static
string
|
$rightname
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. |
#
false
|
public
boolean
|
$notificationqueueonaction
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. |
#
[]
|
protected static
string[]
|
$foreign_key_fields_of
Computed values of classes foreign keys. |
#
[]
|
public static
array
|
$undisclosedFields
Fields to remove when querying data with api |
#
[]
|
$displaylist,
$othertabs,
$showdebug,
$type
|