/**
  * Chargement de l'alerte
  *
  * @return void
  */
 function loadRefAlerte()
 {
     $this->_ref_alerte = new CAlert();
     $this->_ref_alerte->setObject($this);
     $this->_ref_alerte->tag = self::$tag_alerte;
     $this->_ref_alerte->level = "medium";
     $this->_ref_alerte->loadMatchingObject();
 }
 /**
  * Create an alert if comments is not empty
  *
  * @param string  $comments Comments of the alert
  * @param boolean $update   Search an existing alert for updating
  * @param string  $tag      Tag of the alert
  *
  * @return string Store-like message
  */
 function createAlert($comments, $update = false, $tag = "mouvement_intervention")
 {
     if (!$comments) {
         return null;
     }
     $alerte = new CAlert();
     $alerte->setObject($this);
     $alerte->tag = $tag;
     $alerte->handled = "0";
     $alerte->level = "medium";
     if ($update) {
         $alerte->loadMatchingObject();
     }
     $alerte->comments = $comments;
     return $alerte->store();
 }