Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

group_request_approved.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.91 KiB


 001  <?php
 002  /**
 003  *
 004  * This file is part of the phpBB Forum Software package.
 005  *
 006  * @copyright (c) phpBB Limited <https://www.phpbb.com>
 007  * @license GNU General Public License, version 2 (GPL-2.0)
 008  *
 009  * For full copyright and license information, please see
 010  * the docs/CREDITS.txt file.
 011  *
 012  */
 013   
 014  namespace phpbb\notification\type;
 015   
 016  class group_request_approved extends \phpbb\notification\type\base
 017  {
 018      /**
 019      * {@inheritdoc}
 020      */
 021      public function get_type()
 022      {
 023          return 'notification.type.group_request_approved';
 024      }
 025   
 026      /**
 027      * {@inheritdoc}
 028      */
 029      public function is_available()
 030      {
 031          return false;
 032      }
 033   
 034      /**
 035      * {@inheritdoc}
 036      */
 037      public static function get_item_id($group)
 038      {
 039          return (int) $group['group_id'];
 040      }
 041   
 042      /**
 043      * {@inheritdoc}
 044      */
 045      public static function get_item_parent_id($group)
 046      {
 047          return 0;
 048      }
 049   
 050      /**
 051      * {@inheritdoc}
 052      */
 053      public function find_users_for_notification($group, $options = array())
 054      {
 055          $users = array();
 056   
 057          $group['user_ids'] = (!is_array($group['user_ids'])) ? array($group['user_ids']) : $group['user_ids'];
 058   
 059          foreach ($group['user_ids'] as $user_id)
 060          {
 061              $users[$user_id] = array('');
 062          }
 063   
 064          return $users;
 065      }
 066   
 067      /**
 068      * {@inheritdoc}
 069      */
 070      public function get_title()
 071      {
 072          return $this->user->lang('NOTIFICATION_GROUP_REQUEST_APPROVED', $this->get_data('group_name'));
 073      }
 074   
 075      /**
 076      * {@inheritdoc}
 077      */
 078      public function get_url()
 079      {
 080          return append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, "mode=group&g={$this->item_id}");
 081      }
 082   
 083      /**
 084      * {@inheritdoc}
 085      */
 086      public function create_insert_array($group, $pre_create_data = array())
 087      {
 088          $this->set_data('group_name', $group['group_name']);
 089   
 090          return parent::create_insert_array($group, $pre_create_data);
 091      }
 092   
 093      /**
 094      * {@inheritdoc}
 095      */
 096      public function users_to_query()
 097      {
 098          return array();
 099      }
 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  }
 117