mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 20:24:08 +02:00
[ticket/14387] Extend avatar-driver by extension in ACP not possible
Create two driver methods to provide the driver config name and the driver ACP template name, and use them within the manager method. Default driver config name and template name are the same as now. But new drivers are able to override the config name and template name with their own, including @vendor_extension. PHPBB3-14387
This commit is contained in:
@@ -127,6 +127,14 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
|
||||
return preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($this));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_acp_template_name()
|
||||
{
|
||||
return 'acp_avatar_options_' . $this->get_config_name() . '.html';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name of the driver.
|
||||
*
|
||||
|
@@ -117,4 +117,11 @@ interface driver_interface
|
||||
* @return string Avatar driver's template name
|
||||
*/
|
||||
public function get_template_name();
|
||||
|
||||
/**
|
||||
* Get the avatar driver's template name (ACP)
|
||||
*
|
||||
* @return string Avatar driver's template name
|
||||
*/
|
||||
public function get_acp_template_name();
|
||||
}
|
||||
|
Reference in New Issue
Block a user