mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-14 04:34:07 +02:00
[ticket/11201] Move field type depending preparation of the options to class
PHPBB3-11201
This commit is contained in:
@@ -229,4 +229,14 @@ class type_bool implements type_interface
|
||||
|
||||
return $field_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepare_options_form(&$exclude_options, &$visibility_options)
|
||||
{
|
||||
$exclude_options[1][] = 'lang_options';
|
||||
|
||||
return $this->request->variable('lang_options', array(''), true);
|
||||
}
|
||||
}
|
||||
|
@@ -271,4 +271,12 @@ class type_date implements type_interface
|
||||
|
||||
return $field_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepare_options_form(&$exclude_options, &$visibility_options)
|
||||
{
|
||||
return $this->request->variable('lang_options', '', true);
|
||||
}
|
||||
}
|
||||
|
@@ -222,4 +222,14 @@ class type_dropdown implements type_interface
|
||||
|
||||
return $field_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepare_options_form(&$exclude_options, &$visibility_options)
|
||||
{
|
||||
$exclude_options[1][] = 'lang_options';
|
||||
|
||||
return $this->request->variable('lang_options', '', true);
|
||||
}
|
||||
}
|
||||
|
@@ -196,4 +196,12 @@ class type_int implements type_interface
|
||||
|
||||
return $field_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepare_options_form(&$exclude_options, &$visibility_options)
|
||||
{
|
||||
return $this->request->variable('lang_options', '', true);
|
||||
}
|
||||
}
|
||||
|
@@ -113,4 +113,13 @@ interface type_interface
|
||||
* @return array Returns the language options we need to generate
|
||||
*/
|
||||
public function get_language_options_input($field_data);
|
||||
|
||||
/**
|
||||
* Allows exclusion of options in single steps of the creation process
|
||||
*
|
||||
* @param array $exclude_options Array with options that should be excluded in the steps
|
||||
* @param array $visibility_options Array with options responsible for the fields visibility
|
||||
* @return mixed Returns the provided language options
|
||||
*/
|
||||
public function prepare_options_form(&$exclude_options, &$visibility_options);
|
||||
}
|
||||
|
@@ -122,4 +122,14 @@ abstract class type_string_common
|
||||
|
||||
return $field_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepare_options_form(&$exclude_options, &$visibility_options)
|
||||
{
|
||||
$exclude_options[1][] = 'lang_default_value';
|
||||
|
||||
return $this->request->variable('lang_options', '', true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user