upload
class upload extends driver
Handles avatars uploaded to the board
Properties
protected string | $name | Avatar driver name |
from driver |
protected config | $config | Current board configuration |
from driver |
protected FastImageSize | $imagesize | from driver | |
protected string | $phpbb_root_path | Current $phpbb_root_path |
from driver |
protected string | $php_ext | Current $php_ext |
from driver |
protected path_helper | $path_helper | Path Helper |
from driver |
protected driver_interface | $cache | Cache driver |
from driver |
protected array | $allowed_extensions | Array of allowed avatar image extensions Array is used for setting the allowed extensions in the fileupload class and as a base for a regex of allowed extensions, which will be formed by imploding the array with a "|". |
from driver |
protected storage | $storage | ||
protected dispatcher_interface | $dispatcher | ||
protected factory | $files_factory | ||
protected IniGetWrapper | $php_ini |
Methods
Construct a driver object
Returns custom html if it is needed for displaying this avatar
Delete avatar
Returns the config name of the driver. To be used in accessing the CONFIG variables.
Get the avatar url and dimensions
Prepare form for changing the settings of this avatar
Process form data
Get the avatar driver's template name
Check if user is able to upload an avatar to a temporary folder
Details
at line 68
__construct(config $config, helper $controller_helper, string $phpbb_root_path, string $php_ext, storage $storage, path_helper $path_helper, dispatcher_interface $dispatcher, factory $files_factory, IniGetWrapper $php_ini)
Construct a driver object
in
driver at line 98
string
get_custom_html(user $user, array $row, string $alt = '')
Returns custom html if it is needed for displaying this avatar
at line 217
array
prepare_form_acp(user $user)
Prepare form for changing the acp settings of this avatar
at line 227
bool
delete(array $row)
Delete avatar
in
driver at line 122
string
get_name()
Returns the name of the driver.
in
driver at line 130
string
get_config_name()
Returns the config name of the driver. To be used in accessing the CONFIG variables.
in
driver at line 138
string
get_acp_template_name()
Get the avatar driver's template name (ACP)
in
driver at line 148
set_name(string $name)
Sets the name of the driver.
at line 84
array
get_data(array $row)
Get the avatar url and dimensions
at line 96
bool
prepare_form(request $request, template $template, user $user, array $row, array $error)
Prepare form for changing the settings of this avatar
at line 114
array
process_form(request $request, template $template, user $user, array $row, array $error)
Process form data
at line 271
string
get_template_name()
Get the avatar driver's template name
at line 281
protected bool
can_upload()
Check if user is able to upload an avatar to a temporary folder