[ Index ]

PHP Cross Reference of phpBB-3.3.0-deutsch

title

Body

[close]

/phpbb/avatar/ -> manager.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 375 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

manager:: (14 methods):
  __construct()
  register_avatar_drivers()
  get_driver()
  load_enabled_drivers()
  get_all_drivers()
  get_enabled_drivers()
  clean_row()
  clean_driver_name()
  prepare_driver_name()
  is_enabled()
  get_avatar_settings()
  localize_errors()
  handle_avatar_delete()
  prefix_avatar_columns()


Class: manager  - X-Ref

__construct(\phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, $avatar_drivers)   X-Ref
Construct an avatar manager object

param: \phpbb\config\config $config phpBB configuration
param: \phpbb\event\dispatcher_interface $phpbb_dispatcher phpBB event dispatcher
param: array $avatar_drivers Avatar drivers passed via the service container

register_avatar_drivers($avatar_drivers)   X-Ref
Register avatar drivers

param: array $avatar_drivers Service collection of avatar drivers

get_driver($avatar_type, $load_enabled = true)   X-Ref
Get the driver object specified by the avatar type

return: object Avatar driver object
param: string $avatar_type Avatar type; by default an avatar's service container name
param: bool $load_enabled Load only enabled avatars

load_enabled_drivers()   X-Ref
Load the list of enabled drivers
This is executed once and fills self::$enabled_drivers


get_all_drivers()   X-Ref
Get a list of all avatar drivers

As this function will only be called in the ACP avatar settings page, it
doesn't make much sense to cache the list of all avatar drivers like the
list of the enabled drivers.

return: array Array containing a list of all avatar drivers

get_enabled_drivers()   X-Ref
Get a list of enabled avatar drivers

return: array Array containing a list of the enabled avatar drivers

clean_row($row, $prefix = '')   X-Ref
Strip out user_, group_, or other prefixes from array keys

return: array    User or group data with keys that have been
param: array    $row            User data or group data
param: string $prefix            Prefix of data keys (e.g. user), should not include the trailing underscore

clean_driver_name($name)   X-Ref
Clean driver names that are returned from template files
Underscores are replaced with dots

return: string Cleaned driver name
param: string $name Driver name

prepare_driver_name($name)   X-Ref
Prepare driver names for use in template files
Dots are replaced with underscores

return: string Prepared driver name
param: string $name Clean driver name

is_enabled($driver)   X-Ref
Check if avatar is enabled

return: bool True if avatar is enabled, false if it's disabled
param: object $driver Avatar driver object

get_avatar_settings($driver)   X-Ref
Get the settings array for enabling/disabling an avatar driver

return: array Array of configuration options as consumed by acp_board
param: object $driver Avatar driver object

localize_errors(\phpbb\user $user, $error)   X-Ref
Replace "error" strings with their real, localized form

return: array Array containing the localized error strings
param: \phpbb\user phpBB User object
param: array    $error Array containing error strings

handle_avatar_delete(\phpbb\db\driver\driver_interface $db, \phpbb\user $user, $avatar_data, $table, $prefix)   X-Ref
Handle deleting avatars

return: null
param: \phpbb\db\driver\driver_interface $db phpBB dbal
param: \phpbb\user    $user phpBB user object
param: array          $avatar_data Cleaned user data containing the user's
param: string         $table Database table from which the avatar should be deleted
param: string         $prefix Prefix of user data columns in database

prefix_avatar_columns($prefix, $data)   X-Ref
Prefix avatar columns

return: array Column data with prefixed column names
param: string $prefix Column prefix
param: array $data Column data



Generated: Tue Apr 7 19:44:41 2020 Cross-referenced by PHPXref 0.7.1