mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/11201] Rename profilefields class to manager
PHPBB3-11201
This commit is contained in:
@@ -13,7 +13,7 @@ namespace phpbb\profilefields;
|
||||
* Custom Profile Fields
|
||||
* @package phpBB3
|
||||
*/
|
||||
class profilefields
|
||||
class manager
|
||||
{
|
||||
/**
|
||||
* Auth object
|
@@ -19,7 +19,7 @@ class type_bool extends type_base
|
||||
|
||||
/**
|
||||
* Profile fields object
|
||||
* @var \phpbb\profilefields\profilefields
|
||||
* @var \phpbb\profilefields\manager
|
||||
*/
|
||||
protected $profilefields;
|
||||
|
||||
@@ -45,16 +45,16 @@ class type_bool extends type_base
|
||||
* Construct
|
||||
*
|
||||
* @param \phpbb\profilefields\lang_helper $lang_helper Profile fields language helper
|
||||
* @param \phpbb\profilefields\profilefields $profilefields Profile fields object
|
||||
* @param \phpbb\profilefields\manager $manager Profile fields object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param string $language_table Table where the language strings are stored
|
||||
*/
|
||||
public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\profilefields\profilefields $profilefields, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
|
||||
public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\profilefields\manager $manager, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
|
||||
{
|
||||
$this->lang_helper = $lang_helper;
|
||||
$this->profilefields = $profilefields;
|
||||
$this->manager = $manager;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
@@ -88,7 +88,7 @@ class type_bool extends type_base
|
||||
|
||||
$options = array(
|
||||
0 => array('TITLE' => $this->user->lang['FIELD_TYPE'], 'EXPLAIN' => $this->user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type="radio" class="radio" name="field_length" value="1"' . (($field_data['field_length'] == 1) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['RADIO_BUTTONS'] . '</label><label><input type="radio" class="radio" name="field_length" value="2"' . (($field_data['field_length'] == 2) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['CHECKBOX'] . '</label>'),
|
||||
1 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->profilefields->process_field_row('preview', $profile_row)),
|
||||
1 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->manager->process_field_row('preview', $profile_row)),
|
||||
);
|
||||
|
||||
return $options;
|
||||
|
@@ -13,9 +13,9 @@ class type_date extends type_base
|
||||
{
|
||||
/**
|
||||
* Profile fields object
|
||||
* @var \phpbb\profilefields\profilefields
|
||||
* @var \phpbb\profilefields\manager
|
||||
*/
|
||||
protected $profilefields;
|
||||
protected $manager;
|
||||
|
||||
/**
|
||||
* Request object
|
||||
@@ -38,15 +38,15 @@ class type_date extends type_base
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param \phpbb\profilefields\profilefields $profilefields Profile fields object
|
||||
* @param \phpbb\profilefields\manager $manager Profile fields object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param string $language_table Table where the language strings are stored
|
||||
*/
|
||||
public function __construct(\phpbb\profilefields\profilefields $profilefields, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
|
||||
public function __construct(\phpbb\profilefields\manager $manager, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
|
||||
{
|
||||
$this->profilefields = $profilefields;
|
||||
$this->manager = $manager;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
@@ -87,7 +87,7 @@ class type_date extends type_base
|
||||
}
|
||||
|
||||
$options = array(
|
||||
0 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->profilefields->process_field_row('preview', $profile_row)),
|
||||
0 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->manager->process_field_row('preview', $profile_row)),
|
||||
1 => array('TITLE' => $this->user->lang['ALWAYS_TODAY'], 'FIELD' => '<label><input type="radio" class="radio" name="always_now" value="1"' . (($s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['YES'] . '</label><label><input type="radio" class="radio" name="always_now" value="0"' . ((!$s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['NO'] . '</label>'),
|
||||
);
|
||||
|
||||
|
@@ -19,9 +19,9 @@ class type_dropdown extends type_base
|
||||
|
||||
/**
|
||||
* Profile fields object
|
||||
* @var \phpbb\profilefields\profilefields
|
||||
* @var \phpbb\profilefields\manager
|
||||
*/
|
||||
protected $profilefields;
|
||||
protected $manager;
|
||||
|
||||
/**
|
||||
* Request object
|
||||
@@ -45,16 +45,16 @@ class type_dropdown extends type_base
|
||||
* Construct
|
||||
*
|
||||
* @param \phpbb\profilefields\lang_helper $lang_helper Profile fields language helper
|
||||
* @param \phpbb\profilefields\profilefields $profilefields Profile fields object
|
||||
* @param \phpbb\profilefields\manager $manager Profile fields object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param string $language_table Table where the language strings are stored
|
||||
*/
|
||||
public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\profilefields\profilefields $profilefields, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
|
||||
public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\profilefields\manager $manager, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
|
||||
{
|
||||
$this->lang_helper = $lang_helper;
|
||||
$this->profilefields = $profilefields;
|
||||
$this->manager = $manager;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
@@ -91,8 +91,8 @@ class type_dropdown extends type_base
|
||||
$profile_row[1]['field_default_value'] = $field_data['field_novalue'];
|
||||
|
||||
$options = array(
|
||||
0 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->profilefields->process_field_row('preview', $profile_row[0])),
|
||||
1 => array('TITLE' => $this->user->lang['NO_VALUE_OPTION'], 'EXPLAIN' => $this->user->lang['NO_VALUE_OPTION_EXPLAIN'], 'FIELD' => $this->profilefields->process_field_row('preview', $profile_row[1])),
|
||||
0 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->manager->process_field_row('preview', $profile_row[0])),
|
||||
1 => array('TITLE' => $this->user->lang['NO_VALUE_OPTION'], 'EXPLAIN' => $this->user->lang['NO_VALUE_OPTION_EXPLAIN'], 'FIELD' => $this->manager->process_field_row('preview', $profile_row[1])),
|
||||
);
|
||||
|
||||
return $options;
|
||||
|
Reference in New Issue
Block a user