1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[ticket/17361] Move language keys to storage adapters

PHPBB-17361
This commit is contained in:
Ruben Calvo
2024-11-30 01:25:17 +01:00
parent be3966c0cb
commit a44295a1ba
6 changed files with 118 additions and 24 deletions

View File

@@ -22,6 +22,13 @@ interface provider_interface
*/
public function get_name(): string;
/**
* Gets adapter title for acp
*
* @return string
*/
public function get_title(): string;
/**
* Gets adapter class
*
@@ -32,7 +39,67 @@ interface provider_interface
/**
* Gets adapter options
*
* @return array Configuration keys
* Example:
* public function get_options()
* {
* return [
* 'text-test' => [
* 'title' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_TEXT_TEST'),
* 'description' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_TEXT_TEST_EXPLAIN'),
* 'form_macro' => [
* 'tag' => 'input',
* 'type' => 'text',
* ],
* ],
* 'password-test' => [
* 'title' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_PASSWORD_TEST'),
* 'description' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_PASSWORD_TEST_EXPLAIN'),
* 'form_macro' => [
* 'tag' => 'input',
* 'type' => 'password',
* ],
* ],
* 'radio-test' => [
* 'title' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_RADIO_TEST'),
* 'description' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_RADIO_TEST_EXPLAIN'),
* 'form_macro' => [
* 'tag' => 'radio',
* 'buttons' => [
* [
* 'type' => 'radio',
* 'value' => '1',
* 'label' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_RADIO_TEST_LABEL_ONE'),
* ],
* [
* 'type' => 'radio',
* 'value' => '2',
* 'label' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_RADIO_TEST_LABEL_TWO'),
* ],
* ],
* ],
* ],
* 'select-test' => [
* 'title' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_SELECT_TEST'),
* 'description' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_SELECT_TEST_EXPLAIN'),
* 'form_macro' => [
* 'tag' => 'select',
* 'options' => [
* ['value' => 'one', 'label' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_SELECT_TEST_LABEL_ONE')],
* ['value' => 'two', 'label' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_SELECT_TEST_LABEL_TWO')],
* ],
* ],
* ],
* 'textarea-test' => [
* 'title' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_TEXTAREA_TEST'),
* 'description' => $this->language->lang('STORAGE_ADAPTER_DEMO_OPTION_TEXTAREA_TEST_EXPLAIN'),
* 'form_macro' => [
* 'tag' => 'textarea',
* ]
* ],
* ];
* }
*
* @return array Configuration keys
*/
public function get_options(): array;