Core Text
The Text class administrates module data for all active frontend languages. The intention is to use this class as a gateway everywhere in Contrexx for translatable texts.
Methods
- function __construct($text, $lang_id, $section, $key, $id=null)
- Generates a new text object for a module, with key
- function store()
- Persists the text to the database
- static function replace($id, $lang_id, $section, $key, $strText)
- Inserts a new text into the database, or replaces an existing one in the database
- static function deleteByKey($section, $key)
- Deletes all texts of a module with a given key (MIND YOUR HEAD!)
- static function getSqlSnippets($field_id, $lang_id, $section, $keys)
- Returns an array with multiple snippets of SQL, to implement translated texts into an existing query
- 'alias': Array with a field name for each key to get the resultset
- 'field': To add into the SELECT, does not contain a comma in the begin and end.
- 'join': To add into the JOIN
- Returns an array with multiple snippets of SQL, to implement translated texts into an existing query
Examples
More examples are in the shop since Contrexx version 3.0.