Ejemplo n.º 1
0
 /**
  * Set notification manager (required)
  *
  * @param \src\notification\manager $notification_manager
  */
 public function set_notification_manager(\src\notification\manager $notification_manager)
 {
     $this->notification_manager = $notification_manager;
     $this->notification_type_id = $this->notification_manager->get_notification_type_id($this->get_type());
 }
Ejemplo n.º 2
0
 /**
  * Output all the notification methods to the template
  *
  * @param \src\notification\manager $src_notifications
  * @param \src\template\template $template
  * @param \src\user $user
  * @param string $block
  */
 public function output_notification_methods(\src\notification\manager $src_notifications, \src\template\template $template, \src\user $user, $block = 'notification_methods')
 {
     $notification_methods = $src_notifications->get_subscription_methods();
     foreach ($notification_methods as $method => $method_data) {
         $template->assign_block_vars($block, array('METHOD' => $method_data['id'], 'NAME' => $user->lang($method_data['lang'])));
     }
 }