/**
  * Get all data needed for template processing
  *
  * @param $event
  * @param $options   array
  **/
 function getDatasForTemplate($event, $options = array())
 {
     $events = $this->getAllEvents();
     $this->datas['##cartridge.entity##'] = Dropdown::getDropdownName('glpi_entities', $options['entities_id']);
     $this->datas['##cartridge.action##'] = $events[$event];
     foreach ($options['items'] as $id => $cartridge) {
         $tmp = array();
         $tmp['##cartridge.item##'] = $cartridge['name'];
         $tmp['##cartridge.reference##'] = $cartridge['ref'];
         $tmp['##cartridge.remaining##'] = cartridge::getUnusedNumber($id);
         $tmp['##cartridge.url##'] = $this->formatURL($options['additionnaloption']['usertype'], "CartridgeItem_" . $id);
         $this->datas['cartridges'][] = $tmp;
     }
     $this->getTags();
     foreach ($this->tag_descriptions[NotificationTarget::TAG_LANGUAGE] as $tag => $values) {
         if (!isset($this->datas[$tag])) {
             $this->datas[$tag] = $values['label'];
         }
     }
 }
 /**
  * Get all data needed for template processing
  *
  * @param $event
  * @param $options   array
  **/
 function getDatasForTemplate($event, $options = array())
 {
     global $CFG_GLPI;
     $events = $this->getAllEvents();
     $this->datas['##cartridge.entity##'] = Dropdown::getDropdownName('glpi_entities', $options['entities_id']);
     $this->datas['##cartridge.action##'] = $events[$event];
     foreach ($options['items'] as $id => $cartridge) {
         $tmp = array();
         $tmp['##cartridge.item##'] = $cartridge['name'];
         $tmp['##cartridge.reference##'] = $cartridge['ref'];
         $tmp['##cartridge.remaining##'] = cartridge::getUnusedNumber($id);
         $tmp['##cartridge.url##'] = urldecode($CFG_GLPI["url_base"] . "/index.php?redirect=cartridgeitem_" . $id);
         $this->datas['cartridges'][] = $tmp;
     }
     $this->getTags();
     foreach ($this->tag_descriptions[NotificationTarget::TAG_LANGUAGE] as $tag => $values) {
         if (!isset($this->datas[$tag])) {
             $this->datas[$tag] = $values['label'];
         }
     }
 }