ManagelocalesElement
extends Element
in package
This Element is responsible for drawing screens in the Admin View related to localization. Namely, the ability to create, delete, and text writing mode for locales as well as the ability to modify translations within a locale.
Tags
Table of Contents
- $view : object
- The View on which this Element is drawn
- __construct() : mixed
- constructor stores a reference to the view this element will reside on
- formatHref() : string
- Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)
- render() : mixed
- Responsible for drawing the create, delete set writing mode screen for locales as well ass the screen for adding modifying translations
- renderLocaleForm() : mixed
- Draws the add locale and edit locale forms
- renderSearchForm() : mixed
- Draws the search for locales forms
Properties
$view
The View on which this Element is drawn
public
object
$view
Methods
__construct()
constructor stores a reference to the view this element will reside on
public
__construct([object $view = null ]) : mixed
Parameters
- $view : object = null
-
object this element will reside on
Return values
mixed —formatHref()
Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)
public
formatHref(string $url) : string
Parameters
- $url : string
-
to clean up
Return values
string —cleaned url
render()
Responsible for drawing the create, delete set writing mode screen for locales as well ass the screen for adding modifying translations
public
render(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
contains info about the available locales and what has been translated
Return values
mixed —renderLocaleForm()
Draws the add locale and edit locale forms
public
renderLocaleForm(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
consists of values of locale fields set so far as well as values of the drops downs on the form
Return values
mixed —renderSearchForm()
Draws the search for locales forms
public
renderSearchForm(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
consists of values of locale fields set so far as well as values of the drops downs on the form