Main framework objects¶
GLPI contains numerous classes; but there are a few common objects you’d have to know about. All GLPI classes are in the src
directory.
Prior to GLPI 10.0, the classes were in the inc
directory. Now, only non-class PHP files remain there.
Note
See the full API documentation for related object for a complete list of methods provided.
CommonGLPI¶
This is the main GLPI object, most of GLPI or Plugins class inherit from this one, directly or not.
This object will help you to:
- manage item type name,
- manage item tabs,
- manage item menu,
- do some display,
- get URLs (form, search, …),
- …
CommonDBTM¶
This is an object to manage any database stuff; it of course inherits from CommonGLPI.
It aims to manage database persistence and tables for all objects; and will help you to:
- add, update or delete database rows,
- load a row from the database,
- get table informations (name, indexes, relations, …)
- …
The CommonDBTM object provides several of the available hooks.
CommonDropdown¶
This class aims to manage dropdown (lists) database stuff. It inherits from CommonDBTM.
It will help you to:
- manage the list,
- import data,
- …
CommonTreeDropdown¶
This class aims to manage tree lists database stuff. It inherits from CommonDropdown.
It will mainly help you to manage the tree apsect of a dropdown (parents, children, and so on).
CommonImplicitTreeDropdown¶
This class manages tree lists that cannot be managed by the user. It inherits from CommonTreeDropdown.
CommonDBVisible¶
This class helps with visibility management. It inherits from CommonDBTM.
It provides methods to:
- know if the user can view item,
- get dropdown parameters,
- …
CommonDBConnexity¶
This class factorizes database relation and inheritance stuff. It inherits from CommonDBTM.
It is not designed to be used directly, see CommonDBChild and CommonDBRelation.
CommonDBChild¶
This class manages simple relations. It inherits from CommonDBConnexity.
This object will help you to define and manage parent/child relations.
CommonDBRelation¶
This class manages relations. It inherits from CommonDBConnexity.
Unlike CommonDBChild; it is designed to declare more complex relations; as defined in the database model. This is therefore more complex thant just using a simple relation; but it also offers many more possibilities.
In order to setup a complex relation, you’ll have to define several properties, such as:
$itemtype_1
and$itemtype_2
; to set both itm types used;$items_id_1
and$items_id_2
; to set field id name.
Other properties let you configure how to deal with entities inheritance, ACLs; what to log on each part on several actions, and so on.
The object will also help you to:
- get search options and query,
- find rights in ACLs list,
- handle massive actions,
- …
CommonDevice¶
This class factorizes common requirements on devices. It inherits from CommonDropdown.
It will help you to:
- import devices,
- handle menus,
- do some display,
- …
Common ITIL objects¶
All common ITIL objects will help you with ITIL objects management (Tickets, Changes, Problems).
CommonITILObject¶
Handle ITIL objects. It inherits from CommonDBTM.
It will help you to:
- get users, suppliers, groups, …
- count them,
- get objects for users, technicians, suppliers, …
- get status,
- …
CommonITILActor¶
Handle ITIL actors. It inherits from CommonDBRelation.
It will help you to:
- get actors,
- show notifications,
- get ACLs,
- …
CommonITILCost¶
Handle ITIL costs. It inherits from CommonDBChild.
It will help you to:
- get item cost,
- do some display,
- …
CommonITILTask¶
Handle ITIL tasks. It inherits from CommonDBTM.
It will help you to:
- manage tasks ACLs,
- do some display,
- get search options,
- …
CommonITILValidation¶
Handle ITIL validation process. It inherits from CommonDBChild.
It will help you to:
- mange ACLs,
- get and set status,
- get counts,
- do some display,
- …