mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-20 15:31:42 +02:00
[feature/avatars] UCP Avatar Interface
This stubs out the avatar form fields and how form processing will occur. Form processing is not yet implemented, but shouldn't be too hard. After this I will refactor/duplicate some of the logic for the ACP. PHPBB3-10018
This commit is contained in:
committed by
Cullen Walsh
parent
24379f1297
commit
7abded081d
@@ -26,6 +26,9 @@ class phpbb_avatar_manager
|
||||
private $cache;
|
||||
private static $valid_drivers = false;
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
**/
|
||||
public function __construct($phpbb_root_path, $php_ext = '.php', phpbb_config $config, phpbb_cache_driver_interface $cache = null)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
@@ -34,6 +37,9 @@ class phpbb_avatar_manager
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
**/
|
||||
public function get_singleton($avatar_type)
|
||||
{
|
||||
if (self::$valid_drivers === false)
|
||||
@@ -57,6 +63,9 @@ class phpbb_avatar_manager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
**/
|
||||
private function load_valid_drivers()
|
||||
{
|
||||
require_once($this->phpbb_root_path . 'includes/avatar/driver.' . $this->php_ext);
|
||||
@@ -88,4 +97,16 @@ class phpbb_avatar_manager
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
**/
|
||||
public function get_valid_drivers() {
|
||||
if (self::$valid_drivers === false)
|
||||
{
|
||||
$this->load_valid_drivers();
|
||||
}
|
||||
|
||||
return array_keys(self::$valid_drivers);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user