예제 #1
0
 /**
  *
  * @param  string        $event
  * @param  Array         $params
  * @param  mixed content $object
  * @return Void
  */
 public function fire($event, $params, &$object)
 {
     $default = ['usr_id' => null, 'lst' => '', 'ssttid' => '', 'dest' => '', 'reason' => ''];
     $params = array_merge($default, $params);
     $dom_xml = new DOMDocument('1.0', 'UTF-8');
     $dom_xml->preserveWhiteSpace = false;
     $dom_xml->formatOutput = true;
     $root = $dom_xml->createElement('datas');
     $lst = $dom_xml->createElement('lst');
     $ssttid = $dom_xml->createElement('ssttid');
     $dest = $dom_xml->createElement('dest');
     $reason = $dom_xml->createElement('reason');
     $lst->appendChild($dom_xml->createTextNode($params['lst']));
     $ssttid->appendChild($dom_xml->createTextNode($params['ssttid']));
     $dest->appendChild($dom_xml->createTextNode($params['dest']));
     $reason->appendChild($dom_xml->createTextNode($params['reason']));
     $root->appendChild($lst);
     $root->appendChild($ssttid);
     $root->appendChild($dest);
     $root->appendChild($reason);
     $dom_xml->appendChild($root);
     $datas = $dom_xml->saveXml();
     $mailed = false;
     if ($this->shouldSendNotificationFor($params['usr_id'])) {
         if (parent::email()) {
             $mailed = true;
         }
     }
     $this->broker->notify($params['usr_id'], __CLASS__, $datas, $mailed);
     return;
 }
예제 #2
0
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->group = $this->app->trans('Commande');
     return $this;
 }
예제 #3
0
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->group = $this->app->trans('Validation');
 }
 /**
  *
  * @return notify_validationreminder
  */
 public function __construct(Application $app, eventsmanager_broker $broker)
 {
     parent::__construct($app, $broker);
     $this->group = $this->app->trans('Validation');
     return $this;
 }