[ Index ]

PHP Cross Reference of phpBB-3.3.2-deutsch

title

Body

[close]

/phpbb/notification/type/ -> group_request_approved.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\notification\type;
  15  
  16  class group_request_approved extends \phpbb\notification\type\base
  17  {
  18      /**
  19      * {@inheritdoc}
  20      */
  21  	public function get_type()
  22      {
  23          return 'notification.type.group_request_approved';
  24      }
  25  
  26      /**
  27      * {@inheritdoc}
  28      */
  29  	public function is_available()
  30      {
  31          return false;
  32      }
  33  
  34      /**
  35      * {@inheritdoc}
  36      */
  37  	static public function get_item_id($group)
  38      {
  39          return (int) $group['group_id'];
  40      }
  41  
  42      /**
  43      * {@inheritdoc}
  44      */
  45  	static public function get_item_parent_id($group)
  46      {
  47          return 0;
  48      }
  49  
  50      /**
  51      * {@inheritdoc}
  52      */
  53  	public function find_users_for_notification($group, $options = array())
  54      {
  55          $users = array();
  56  
  57          $group['user_ids'] = (!is_array($group['user_ids'])) ? array($group['user_ids']) : $group['user_ids'];
  58  
  59          foreach ($group['user_ids'] as $user_id)
  60          {
  61              $users[$user_id] = $this->notification_manager->get_default_methods();
  62          }
  63  
  64          return $users;
  65      }
  66  
  67      /**
  68      * {@inheritdoc}
  69      */
  70  	public function get_title()
  71      {
  72          return $this->language->lang('NOTIFICATION_GROUP_REQUEST_APPROVED', $this->get_data('group_name'));
  73      }
  74  
  75      /**
  76      * {@inheritdoc}
  77      */
  78  	public function get_url()
  79      {
  80          return append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, "mode=group&g={$this->item_id}");
  81      }
  82  
  83      /**
  84      * {@inheritdoc}
  85      */
  86  	public function create_insert_array($group, $pre_create_data = array())
  87      {
  88          $this->set_data('group_name', $group['group_name']);
  89  
  90          parent::create_insert_array($group, $pre_create_data);
  91      }
  92  
  93      /**
  94      * {@inheritdoc}
  95      */
  96  	public function users_to_query()
  97      {
  98          return array();
  99      }
 100  
 101      /**
 102      * {@inheritdoc}
 103      */
 104  	public function get_email_template()
 105      {
 106          return false;
 107      }
 108  
 109      /**
 110      * {@inheritdoc}
 111      */
 112  	public function get_email_template_variables()
 113      {
 114          return array();
 115      }
 116  }


Generated: Wed Nov 11 20:28:18 2020 Cross-referenced by PHPXref 0.7.1