function getTags()
 {
     parent::getTags();
     //Locales
     $tags = array('ticket.type' => __('Type'), 'ticket.sla' => __('SLA'), 'ticket.requesttype' => __('Request source'), 'ticket.itemtype' => __('Item type'), 'ticket.item.name' => __('Associated item'), 'ticket.item.serial' => __('Serial number'), 'ticket.item.otherserial' => __('Inventory number'), 'ticket.item.location' => sprintf(__('%1$s: %2$s'), _n('Associated element', 'Associated elements', 2), __('Location')), 'ticket.item.model' => __('Model'), 'ticket.item.contact' => __('Alternate username'), 'ticket.item.contactnumber' => __('Alternate username number'), 'ticket.item.user' => __('User'), 'ticket.item.group' => __('Group'), 'ticket.isdeleted' => __('Deleted'), 'followup.date' => __('Opening date'), 'followup.isprivate' => __('Private'), 'followup.author' => __('Writer'), 'followup.description' => __('Description'), 'followup.requesttype' => __('Request source'), 'ticket.numberoffollowups' => _x('quantity', 'Number of followups'), 'ticket.numberoflinkedtickets' => _x('quantity', 'Number of linked tickets'), 'ticket.numberofproblems' => _x('quantity', 'Number of problems'), 'ticket.numberofchanges' => _x('quantity', 'Number of changes'), 'ticket.numberofitems' => _x('quantity', 'Number of items'), 'ticket.autoclose' => __('Automatic closing of solved tickets after'), 'ticket.location' => __('Location'), 'ticket.globalvalidation' => __('Global approval status'), 'ticket.solution.approval.description' => __('Solution rejection comment'), 'ticket.solution.approval.date' => __('Solution rejection date'), 'ticket.solution.approval.author' => __('Approver'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => NotificationTarget::TAG_FOR_ALL_EVENTS));
     }
     //Events specific for validation
     $tags = array('validation.author' => __('Requester'), 'validation.status' => __('Status of the approval request'), 'validation.submissiondate' => sprintf(__('%1$s: %2$s'), __('Request'), __('Date')), 'validation.commentsubmission' => sprintf(__('%1$s: %2$s'), __('Request'), __('Comments')), 'validation.validationdate' => sprintf(__('%1$s: %2$s'), __('Validation'), __('Date')), 'validation.validator' => __('Decision-maker'), 'validation.commentvalidation' => sprintf(__('%1$s: %2$s'), __('Validation'), __('Comments')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => array('validation', 'validation_answer')));
     }
     //Tags without lang for validation
     $tags = array('validation.submission.title' => __('A validation request has been submitted'), 'validation.answer.title' => __('An answer to a validation request was produced'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false, 'events' => array('validation', 'validation_answer')));
     }
     // Events for ticket satisfaction
     $tags = array('satisfaction.datebegin' => __('Creation date of the satisfaction survey'), 'satisfaction.dateanswered' => __('Response date to the satisfaction survey'), 'satisfaction.satisfaction' => __('Satisfaction'), 'satisfaction.description' => __('Comments to the satisfaction survey'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => array('satisfaction')));
     }
     $tags = array('satisfaction.type' => __('Survey type'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false, 'events' => array('satisfaction')));
     }
     $tags = array('satisfaction.text' => __('Invitation to fill out the survey'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'lang' => true, 'events' => array('satisfaction')));
     }
     //Foreach global tags
     $tags = array('followups' => _n('Followup', 'Followups', Session::getPluralNumber()), 'validations' => _n('Validation', 'Validations', Session::getPluralNumber()), 'linkedtickets' => _n('Linked ticket', 'Linked tickets', Session::getPluralNumber()), 'problems' => _n('Problem', 'Problems', Session::getPluralNumber()), 'changes' => _n('Change', 'Changes', Session::getPluralNumber()), 'items' => _n('Associated item', 'Associated items', Session::getPluralNumber()), 'documents' => _n('Document', 'Documents', Session::getPluralNumber()));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'foreach' => true));
     }
     //Tags with just lang
     $tags = array('ticket.linkedtickets' => _n('Linked ticket', 'Linked tickets', Session::getPluralNumber()), 'ticket.problems' => _n('Problem', 'Problems', Session::getPluralNumber()), 'ticket.changes' => _n('Change', 'Changes', Session::getPluralNumber()), 'ticket.autoclosewarning' => sprintf(_n('Without a reply, the ticket will be automatically closed after %s day', 'Without a reply, the ticket will be automatically closed after %s days', 2), '?'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'lang' => true));
     }
     //Foreach tag for alertnotclosed
     $this->addTagToList(array('tag' => 'tickets', 'label' => __('Not solved tickets'), 'value' => false, 'foreach' => true, 'events' => array('alertnotclosed')));
     //Tags without lang
     $tags = array('ticket.urlvalidation' => sprintf(__('%1$s: %2$s'), __('Validation request'), __('URL')), 'ticket.urlsatisfaction' => sprintf(__('%1$s: %2$s'), __('Satisfaction'), __('URL')), 'linkedticket.id' => sprintf(__('%1$s: %2$s'), _n('Linked ticket', 'Linked tickets', 1), __('ID')), 'linkedticket.link' => sprintf(__('%1$s: %2$s'), _n('Linked ticket', 'Linked tickets', 1), __('Link')), 'linkedticket.url' => sprintf(__('%1$s: %2$s'), _n('Linked ticket', 'Linked tickets', 1), __('URL')), 'linkedticket.title' => sprintf(__('%1$s: %2$s'), _n('Linked ticket', 'Linked tickets', 1), __('Title')), 'linkedticket.content' => sprintf(__('%1$s: %2$s'), _n('Linked ticket', 'Linked tickets', 1), __('Description')), 'problem.id' => sprintf(__('%1$s: %2$s'), __('Problem'), __('ID')), 'problem.date' => sprintf(__('%1$s: %2$s'), __('Problem'), __('Date')), 'problem.url' => sprintf(__('%1$s: %2$s'), __('Problem'), 'URL'), 'problem.title' => sprintf(__('%1$s: %2$s'), __('Problem'), __('Title')), 'problem.content' => sprintf(__('%1$s: %2$s'), __('Problem'), __('Description')), 'change.id' => sprintf(__('%1$s: %2$s'), __('Change'), __('ID')), 'change.date' => sprintf(__('%1$s: %2$s'), __('Change'), __('Date')), 'change.url' => sprintf(__('%1$s: %2$s'), __('Change'), 'URL'), 'change.title' => sprintf(__('%1$s: %2$s'), __('Change'), __('Title')), 'change.content' => sprintf(__('%1$s: %2$s'), __('Change'), __('Description')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false));
     }
     //Tickets with a fixed set of values
     $allowed_validation = array();
     $status = TicketValidation::getAllStatusArray(false, true);
     foreach ($status as $key => $value) {
         $allowed_validation[] = $key;
     }
     $tags = array('validation.validationstatus' => array('text' => __('Status value in database'), 'allowed_values' => $allowed_validation));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label['text'], 'value' => true, 'lang' => false, 'allowed_values' => $label['allowed_values']));
     }
     asort($this->tag_descriptions);
 }
 function getTags()
 {
     parent::getTags();
     //Locales
     $tags = array('problem.numberoftickets' => _x('quantity', 'Number of tickets'), 'problem.numberofchanges' => _x('quantity', 'Number of changes'), 'problem.impacts' => __('Impacts'), 'problem.causes' => __('Causes'), 'problem.symptoms' => __('Symptoms'), 'item.name' => __('Associated item'), 'item.serial' => __('Serial number'), 'item.otherserial' => __('Inventory number'), 'item.location' => __('Location'), 'item.model' => __('Model'), 'item.contact' => __('Alternate username'), 'item.contactnumber' => __('Alternate username number'), 'item.user' => __('User'), 'item.group' => __('Group'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => NotificationTarget::TAG_FOR_ALL_EVENTS));
     }
     //Foreach global tags
     $tags = array('tickets' => _n('Ticket', 'Tickets', Session::getPluralNumber()), 'changes' => _n('Change', 'Changes', Session::getPluralNumber()), 'items' => _n('Item', 'Items', Session::getPluralNumber()));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'foreach' => true));
     }
     //Tags with just lang
     $tags = array('problem.tickets' => _n('Ticket', 'Tickets', Session::getPluralNumber()), 'problem.changes' => _n('Change', 'Changes', Session::getPluralNumber()), 'problem.items' => _n('Item', 'Items', Session::getPluralNumber()));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'lang' => true));
     }
     //Tags without lang
     $tags = array('ticket.id' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('ID')), 'ticket.date' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Date')), 'ticket.url' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('URL')), 'ticket.title' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Title')), 'ticket.content' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Description')), 'change.id' => sprintf(__('%1$s: %2$s'), __('Change'), __('ID')), 'change.date' => sprintf(__('%1$s: %2$s'), __('Change'), __('Date')), 'change.url' => sprintf(__('%1$s: %2$s'), __('Change'), __('URL')), 'change.title' => sprintf(__('%1$s: %2$s'), __('Change'), __('Title')), 'change.content' => sprintf(__('%1$s: %2$s'), __('Change'), __('Description')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false));
     }
     asort($this->tag_descriptions);
 }
 function getTags()
 {
     parent::getTags();
     //Locales
     $tags = array('change.numberoftickets' => _x('quantity', 'Number of tickets'), 'change.numberofproblems' => _x('quantity', 'Number of problems'), 'item.name' => __('Associated item'), 'item.serial' => __('Serial number'), 'item.otherserial' => __('Inventory number'), 'item.location' => __('Location'), 'item.model' => __('Model'), 'item.contact' => __('Alternate username'), 'item.contactnumber' => __('Alternate username number'), 'item.user' => __('User'), 'item.group' => __('Group'), 'change.globalvalidation' => __('Global approval status'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => NotificationTarget::TAG_FOR_ALL_EVENTS));
     }
     //Events specific for validation
     $tags = array('validation.author' => __('Requester'), 'validation.status' => __('Status of the approval request'), 'validation.submissiondate' => sprintf(__('%1$s: %2$s'), __('Request'), __('Date')), 'validation.commentsubmission' => sprintf(__('%1$s: %2$s'), __('Request'), __('Comments')), 'validation.validationdate' => sprintf(__('%1$s: %2$s'), __('Validation'), __('Date')), 'validation.validator' => __('Decision-maker'), 'validation.commentvalidation' => sprintf(__('%1$s: %2$s'), __('Validation'), __('Comments')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => array('validation', 'validation')));
     }
     //Tags without lang for validation
     $tags = array('validation.submission.title' => __('A validation request has been submitted'), 'validation.answer.title' => __('An answer to a validation request was produced'), 'change.urlvalidation' => sprintf(__('%1$s: %2$s'), __('Validation request'), __('URL')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false, 'events' => array('validation', 'validation')));
     }
     //Foreach global tags
     $tags = array('tickets' => _n('Ticket', 'Tickets', Session::getPluralNumber()), 'problems' => _n('Problem', 'Problems', Session::getPluralNumber()), 'items' => _n('Item', 'Items', Session::getPluralNumber()));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'foreach' => true));
     }
     //Tags with just lang
     $tags = array('change.tickets' => _n('Ticket', 'Tickets', Session::getPluralNumber()), 'change.problems' => _n('Problem', 'Problems', Session::getPluralNumber()), 'items' => _n('Item', 'Items', Session::getPluralNumber()));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'lang' => true));
     }
     //Tags without lang
     $tags = array('ticket.id' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('ID')), 'ticket.date' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Date')), 'ticket.url' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('URL')), 'ticket.title' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Title')), 'ticket.content' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Description')), 'problem.id' => sprintf(__('%1$s: %2$s'), __('Problem'), __('ID')), 'problem.date' => sprintf(__('%1$s: %2$s'), __('Problem'), __('Date')), 'problem.url' => sprintf(__('%1$s: %2$s'), __('Problem'), __('URL')), 'problem.title' => sprintf(__('%1$s: %2$s'), __('Problem'), __('Title')), 'problem.content' => sprintf(__('%1$s: %2$s'), __('Problem'), __('Description')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false));
     }
     asort($this->tag_descriptions);
 }
 function getTags()
 {
     parent::getTags();
     //Locales
     $tags = array('task.author' => __('Writer'), 'task.isprivate' => __('Private'), 'task.date' => __('Opening date'), 'task.description' => __('Description'), 'task.category' => __('Category'), 'task.time' => __('Total duration'), 'task.user' => __('By'), 'task.begin' => __('Start date'), 'task.end' => __('End date'), 'task.status' => __('Status'), 'problem.numberoftasks' => __('Number of tasks'), 'problem.numberoftickets' => __('Number of tickets'), 'problem.impacts' => __('Impacts'), 'problem.causes' => __('Causes'), 'problem.symptoms' => __('Symptoms'), 'item.name' => __('Associated item'), 'item.serial' => __('Serial number'), 'item.otherserial' => __('Inventory number'), 'item.location' => __('Location'), 'item.model' => __('Model'), 'item.contact' => __('Alternate username'), 'item.contactnumber' => __('Alternate username number'), 'item.user' => __('User'), 'item.group' => __('Group'));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'events' => NotificationTarget::TAG_FOR_ALL_EVENTS));
     }
     //Foreach global tags
     $tags = array('tasks' => _n('Task', 'Tasks', 2), 'tickets' => _n('Ticket', 'Tickets', 2), 'items' => _n('Item', 'Items', 2));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'foreach' => true));
     }
     //Tags with just lang
     $tags = array('ticket.tickets' => _n('Ticket', 'Tickets', 2), 'items' => _n('Item', 'Items', 2));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => false, 'lang' => true));
     }
     //Tags without lang
     $tags = array('ticket.id' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('ID')), 'ticket.date' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Date')), 'ticket.url' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('URL')), 'ticket.title' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Title')), 'ticket.content' => sprintf(__('%1$s: %2$s'), __('Ticket'), __('Description')));
     foreach ($tags as $tag => $label) {
         $this->addTagToList(array('tag' => $tag, 'label' => $label, 'value' => true, 'lang' => false));
     }
     asort($this->tag_descriptions);
 }