1
0
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:
Joas Schilling
2014-01-17 09:55:52 +01:00
parent 0bdec35cd4
commit 9653764fb1
7 changed files with 63 additions and 27 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}

View File

@@ -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);
}
}