diff options
Diffstat (limited to 'framework/I18N/TTranslateParameter.php')
-rw-r--r-- | framework/I18N/TTranslateParameter.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/framework/I18N/TTranslateParameter.php b/framework/I18N/TTranslateParameter.php index d00e33bb..ad87b8e6 100644 --- a/framework/I18N/TTranslateParameter.php +++ b/framework/I18N/TTranslateParameter.php @@ -59,6 +59,7 @@ class TTranslateParameter extends TControl * @var boolean
*/
protected $trim = true;
+
/**
* Get the parameter substitution key.
@@ -98,11 +99,24 @@ class TTranslateParameter extends TControl return $this->trim;
}
+ public function getValue()
+ {
+ return $this->getViewState('Value', '');
+ }
+
+ public function setValue($value)
+ {
+ $this->setViewState('Value', $value, '');
+ }
+
/**
* @return string parameter contents.
*/
public function getParameter()
{
+ $value = $this->getValue();
+ if(strlen($value) > 0)
+ return $value;
$textWriter = new TTextWriter;
$this->renderControl(new THtmlWriter($textWriter));
return $this->getTrim() ?
|