50 "editable" => Boolean,
52 "class_name" => String,
115 $out .=
$text->format(
"<p id='inline_editing_{code}' class='inline_editor_toolbar'>".
116 "<a href='#' class='edit' onclick='TextLookupManager.editText({text_id}); return false;'>Edit</a>".
117 "{$versioningControls}</p>");
119 $out =
"<div>{$out}</div>";
124 else if($blank =
false)
158 if(count($translations) > 0)
159 $indexed = regroupList($translations,
"language");
166 if($language !=
"English" && !array_key_exists($language, $indexed))
204 $text->text = $value;
214 "text_translation_id" => Number,
216 "language" => String,
230 "English" =>
"English",
231 "French" =>
"French",
232 "Spanish" =>
"Spanish",
233 "German" =>
"German",
234 "Russian" =>
"Russian"
245 $this->primary_key =
"text_translation_id";
246 $this->table =
"text_translation";
248 $this->DataItem(func_get_args());
264 $language =
$user->language;
268 if(!$language || $language ==
"English")
272 $translations = Query::create(
TextTranslation,
"WHERE text_id=:text_id AND language=:language")
273 ->bind(
":text_id",
$text->text_id,
":language", $language)
276 if(count($translations) > 0 && $translations[0]->text)
278 $text->text = $translations[0]->text;
static fireEvent($event, $parameter=null, $mustBeConsumed=false)
Fire an event to all subscribers as detailed in their manifests.
static using()
Import the datamodels, views and manifest for the specified component(s).
static getValue($component, $name)
Retrieve the value of the specified Setting.
static checkPermission($component, $name, $account=null)
Check whether a user has a specific permission.
static setDefaultValue($code, $value, $class_name="")
Called from a component manager fired event setDefaults to set the default value for a text lookup co...
Translations($constraint="")
static getPlainText($code, $obj=null, $blank=false)
Retrieve the plain text value of the text field, with any HTML and leading or trailing whitespace rem...
static getText($code, $obj=null, $blank=false)
Retrieves text for display on a page, given the code.
static getValue($code, $obj=null, $blank=false)
getTranslationOptions()
Given a text record, find the remaining languages for which this text has NOT yet been translated.
static setValue($code, $value, $class_name="")
Set the string (or html) value of a lookup text code.
static getTranslation($text)
static selectDisplayVersion($target, $param="version")