/**
  * @param $report
  * @param $name            (default 'itemtype')
  * @param $label           (default '')
  * @param $types     array
  * @param $ignored   array
  **/
 function __construct($report, $name = 'itemtype', $label = '', $types = array(), $ignored = array())
 {
     global $CFG_GLPI;
     parent::__construct($report, $name, NOT_AVAILABLE, $label ? $label : __('Item type'));
     if (is_array($types) && count($types)) {
         // $types is an hashtable of itemtype => display name
         $this->types = $types;
     } else {
         if (is_string($types) && isset($CFG_GLPI[$types])) {
             // $types is the name of an configured type hashtable (infocom_types, doc_types, ...)
             foreach ($CFG_GLPI[$types] as $itemtype) {
                 if (($item = getItemForItemtype($itemtype)) && !in_array($itemtype, $ignored)) {
                     $this->types[$itemtype] = $item->getTypeName();
                 }
             }
             $this->types['all'] = __('All');
         } else {
             // No types, use helpdesk_types
             $this->types = Ticket::getAllTypesForHelpdesk();
             $this->types['all'] = __('All');
         }
     }
 }
 function __construct($report, $name, $label = '', $options = array())
 {
     parent::__construct($report, $name, NOT_AVAILABLE, $label ? $label : _n('Criterion', 'Criteria', 2));
     $this->choice = $options;
 }
 /**
  * @param $report
  * @param $name      (default 'states_id')
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'states_id', $label = '')
 {
     parent::__construct($report, $name, 'glpi_states', $label ? $label : _n('Status', 'Statuses', 1));
 }
 /**
  * @param $report
  * @param $name      (default 'softwarecategories_id')
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'softwarecategories_id', $label = '')
 {
     parent::__construct($report, $name, 'glpi_softwarecategories', $label ? $label : -n('Software category', 'Software categories', 1));
 }
Exemplo n.º 5
0
 /**
  * @param $report
  * @param $name         (default 'groups_id')
  * @param $label        (default '')
  * @param $condition    (default '')
  **/
 function __construct($report, $name = 'groups_id', $label = '', $condition = '')
 {
     parent::__construct($report, $name, 'glpi_groups', $label ? $label : __('Group'), $condition);
 }
 /**
  * @param $report
  * @param $name      (default 'softwares_id')
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'softwares_id', $label = '')
 {
     parent::__construct($report, $name, 'glpi_softwares', $label ? $label : __('Location'));
 }
Exemplo n.º 7
0
 /**
  * @param $report
  * @param $name      (default usercategories_id)
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'usercategories_id', $label = '')
 {
     parent::__construct($report, $name, 'glpi_usercategories', $label ? $label : sprintf(__('%1$s: %2$s'), _n('User', 'Users', 1), _n('Type', 'Types', 1)));
 }
 /**
  * @param $report
  * @param $name      (default 'itilcategories_id')
  * @param $label     (default '')
  * @param $type      (default '')
  **/
 function __construct($report, $name = 'itilcategories_id', $label = '', $type = '')
 {
     parent::__construct($report, $name, 'glpi_itilcategories', $label ? $label : _n('Categorie of ticket', 'Categories of tickets', 1), $type);
 }
Exemplo n.º 9
0
 /**
  * @param $report
  * @param $name      (default user)
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'user', $label = '')
 {
     parent::__construct($report, $name, 'glpi_users', $label ? $label : _n('User', 'Users', 1));
 }
 /**
  * @param $report
  * @param $name      (default 'taskcategories_id')
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'taskcategories_id', $label = '')
 {
     parent::__construct($report, $name, 'glpi_taskcategories', $label ? $label : __('Task category'));
 }
Exemplo n.º 11
0
 /**
  * @param $report
  * @param $name      (default 'value')
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'value', $label = '')
 {
     parent::__construct($report, $name, NOT_AVAILABLE, $label ? $label : __('Name'));
 }
Exemplo n.º 12
0
 /**
  * @param $report
  * @param $name            (default 'value')
  * @param $label           (default '')
  * @param $signe           (default '')
  * @param $min             (default 0)
  * @param $max             (default 100)
  * @param $coef            (default 1)
  * @param $unit            (default '')
  **/
 function __construct($report, $name = 'value', $label = '', $signe = '', $min = 0, $max = 100, $coef = 1, $unit = '')
 {
     parent::__construct($report, $name, NOT_AVAILABLE, $label ? $label : __('Value'));
     $this->setOptions($signe, $min, $max, $coef, $unit);
 }
 /**
  * @param $report
  * @param $name      (default 'requesttypes_id')
  * @param $label     (default '')
  **/
 function __construct($report, $name = 'requesttypes_id', $label = '')
 {
     parent::__construct($report, $name, NOT_AVAILABLE, $label ? $label : _n('Request source', 'Request sources', 1));
 }
 /**
  * @param $report
  * @param $name      (default 'suppliers_id')
  * @param $label     default '')
  **/
 function __construct($report, $name = 'suppliers_id', $label = '')
 {
     parent::__construct($report, $name, 'glpi_suppliers', $label ? $label : _n('Supplier', 'Suppliers', 1));
 }