![]() |
CMS
Version 3.9
|
Inherits DataItem.
Public Member Functions | |
Translations ($constraint="") | |
getTranslationOptions () | |
Given a text record, find the remaining languages for which this text has NOT yet been translated. More... | |
Static Public Member Functions | |
static | getText ($code, $obj=null, $blank=false) |
Retrieves text for display on a page, given the code. More... | |
static | getValue ($code, $obj=null, $blank=false) |
static | getPlainText ($code, $obj=null, $blank=false) |
Retrieve the plain text value of the text field, with any HTML and leading or trailing whitespace removed. More... | |
static | setDefaultValue ($code, $value, $class_name="") |
Called from a component manager fired event setDefaults to set the default value for a text lookup code. More... | |
static | setValue ($code, $value, $class_name="") |
Set the string (or html) value of a lookup text code. More... | |
Public Attributes | |
$primary_key = "text_id" | |
$table = "text_lookup" | |
$fields | |
$versioned_fields = array("code", "text", "editable", "enabled") | |
$relations | |
Definition at line 41 of file text_lookup.inc.
|
static |
Retrieve the plain text value of the text field, with any HTML and leading or trailing whitespace removed.
string | $code | the lookup code for the text item |
DataItem | $obj | optional DataItem object to use as a merge code value source |
boolean | $blank | true to return an empty string when blank, false to return the item's code |
Definition at line 146 of file text_lookup.inc.
|
static |
Retrieves text for display on a page, given the code.
If an object is passed, then attempt to retrieve any merge codes values for codes used in the text that have been saved to merge_code table under the same class name as the $obj.
string | $code | the value of the code field of the text object |
DataItem | $obj | a data item instance that can retrieve values for merge codes used in the block of text (the text field value of table text_lookup. |
$blank | whether blank is ok; if ok, then return blank when no match found; if not, return the text string to signal to the developer the value is missing from the db. |
Definition at line 85 of file text_lookup.inc.
TextLookup::getTranslationOptions | ( | ) |
Given a text record, find the remaining languages for which this text has NOT yet been translated.
Definition at line 155 of file text_lookup.inc.
|
static |
Definition at line 134 of file text_lookup.inc.
|
static |
Called from a component manager fired event setDefaults to set the default value for a text lookup code.
If the value has already been set, then return.
string | $code | |
string | $value | |
string | $class_name |
Definition at line 182 of file text_lookup.inc.
|
static |
Set the string (or html) value of a lookup text code.
string | $code | |
string | $value | |
string | $class_name |
Definition at line 200 of file text_lookup.inc.
TextLookup::Translations | ( | $constraint = "" | ) |
Definition at line 63 of file text_lookup.inc.
TextLookup::$fields |
Definition at line 46 of file text_lookup.inc.
TextLookup::$primary_key = "text_id" |
Definition at line 43 of file text_lookup.inc.
TextLookup::$relations |
Definition at line 58 of file text_lookup.inc.
TextLookup::$table = "text_lookup" |
Definition at line 44 of file text_lookup.inc.
TextLookup::$versioned_fields = array("code", "text", "editable", "enabled") |
Definition at line 56 of file text_lookup.inc.