class manager
Methods
|
__construct(config $config, array $avatar_drivers)
Construct an avatar manager object |
||
| object |
get_driver(string $avatar_type, bool $load_enabled = true)
Get the driver object specified by the avatar type |
|
| array |
get_all_drivers()
Get a list of all avatar drivers |
|
| array |
get_enabled_drivers()
Get a list of enabled avatar drivers |
|
| static array |
clean_row(array $row, string $prefix = '')
Strip out user_, group_, or other prefixes from array keys |
|
| static string |
clean_driver_name(string $name)
Clean driver names that are returned from template files Underscores are replaced with dots |
|
| static string |
prepare_driver_name(string $name)
Prepare driver names for use in template files Dots are replaced with underscores |
|
| bool |
is_enabled(object $driver)
Check if avatar is enabled |
|
| array |
get_avatar_settings(object $driver)
Get the settings array for enabling/disabling an avatar driver |
|
| array |
localize_errors(user $user, array $error)
Replace "error" strings with their real, localized form |
|
| null |
handle_avatar_delete(driver_interface $db, user $user, array $avatar_data, string $table, string $prefix)
Handle deleting avatars |
|
| array |
prefix_avatar_columns(string $prefix, array $data)
Prefix avatar columns |
Details
at line 54
public
__construct(config $config, array $avatar_drivers)
Construct an avatar manager object
at line 84
public object
get_driver(string $avatar_type, bool $load_enabled = true)
Get the driver object specified by the avatar type
at line 150
public array
get_all_drivers()
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.
at line 171
public array
get_enabled_drivers()
Get a list of enabled avatar drivers
at line 191
static public array
clean_row(array $row, string $prefix = '')
Strip out user_, group_, or other prefixes from array keys
at line 222
static public string
clean_driver_name(string $name)
Clean driver names that are returned from template files Underscores are replaced with dots
at line 235
static public string
prepare_driver_name(string $name)
Prepare driver names for use in template files Dots are replaced with underscores
at line 247
public bool
is_enabled(object $driver)
Check if avatar is enabled
at line 261
public array
get_avatar_settings(object $driver)
Get the settings array for enabling/disabling an avatar driver
at line 281
public array
localize_errors(user $user, array $error)
Replace "error" strings with their real, localized form
at line 310
public null
handle_avatar_delete(driver_interface $db, user $user, array $avatar_data, string $table, string $prefix)
Handle deleting avatars
at line 344
public array
prefix_avatar_columns(string $prefix, array $data)
Prefix avatar columns