|
| static | input ($name, $value, array $attributes=[]) |
| |
| static | textarea ($name, $value, array $attributes=[]) |
| |
| static | isEnabled () |
| |
|
| | __construct ($template, $name, $value, array $attributes) |
| |
Translation class
Automatic generation of inputs and textareas for i18n
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m
-
Peter Thienel pthie.nosp@m.nel@.nosp@m.data-.nosp@m.ques.nosp@m.t.de
-
Elmar Ludwig elmar.nosp@m..lud.nosp@m.wig@u.nosp@m.os.d.nosp@m.e
-
Florian Bieringer @license GPL2 or any later version
◆ __construct()
| __construct |
( |
|
$template, |
|
|
|
$name, |
|
|
|
$value, |
|
|
array |
$attributes |
|
) |
| |
|
protected |
Protected constructor in order to always force a specific input type.
- Parameters
-
| string | Flexi_Template | $template | Template to use |
| string | $name | Name of the element |
| string | I18NString | $value | Value of the element |
| array_merge | $attributes | Additional variables for the element |
◆ __toString()
Converts the object to a string by rendering it.
- Returns
- string
- See also
- I18N::render()
◆ checkMvvPerms()
MVV: Check user's permissions for an object and set the readonly state accordingly.
- Parameters
-
| ModuleManagementModel | $object | Object to check permissions for |
| string | $perm | Permission to check (default create) |
- Returns
- I18N object to allow chaining
◆ input()
| static input |
( |
|
$name, |
|
|
|
$value, |
|
|
array |
$attributes = [] |
|
) |
| |
|
static |
Creates a set of HTML input elements for this form element in text form. One element will be generated for each configured content language.
- Parameters
-
| string | $name | HTML name of the Inputfild |
| I18NString | $value | (Needs to be an i18n input string) |
| array | $attributes | Additional attributes of the input |
- Returns
- string Crafted input
◆ isEnabled()
Returns whether the i18n functionality is enabeld i.e. more than the default language is configured in config_defaults.inc.php.
- Returns
- bool True if i18n is enabled.
◆ render()
| render |
( |
array |
$attributes = [] | ) |
|
Renders the element as html.
- Parameters
-
| array | $attributes | Additional attributes |
- Returns
- string
◆ setReadonly()
| setReadonly |
( |
|
$state = true | ) |
|
Sets the readonly state of the element.
- Parameters
-
| bool | $state | State of the readonly attribute (default true) |
- Returns
- I18N object to allow chaining
◆ textarea()
| static textarea |
( |
|
$name, |
|
|
|
$value, |
|
|
array |
$attributes = [] |
|
) |
| |
|
static |
Create a set of HTML textarea elements for this form element in text form. One element will be generated for each configured content language.
- Parameters
-
| string | $name | HTML name of the Textarea |
| I18NString | $value | (Needs to be an i18n input string) |
| array | $attributes | Additional attributes of the input |
- Returns
- string Crafted textarea
◆ $attributes
◆ $name
◆ $template
◆ $value
The documentation for this class was generated from the following file: