summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateManager.php
diff options
context:
space:
mode:
authorxue <>2006-02-17 04:28:06 +0000
committerxue <>2006-02-17 04:28:06 +0000
commitae1c1995b2fec431afe7cca23b2697e1bef17baf (patch)
tree43fb70539492615022e434435a70e35241a898f2 /framework/Web/UI/TTemplateManager.php
parent31807816360c93080a6a0da55b858d708cd85c8b (diff)
moved shortcut methods from TComponent to TControl.
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r--framework/Web/UI/TTemplateManager.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 67bda1b2..e87a23eb 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -50,7 +50,7 @@ class TTemplateManager extends TModule
*/
public function init($config)
{
- $this->getService()->setTemplateManager($this);
+ $this->getApplication()->getPageService()->setTemplateManager($this);
}
/**
@@ -259,7 +259,7 @@ class TTemplate extends TComponent implements ITemplate
public function instantiateIn($tplControl)
{
if(($page=$tplControl->getPage())===null)
- $page=$this->getService()->getRequestedPage();
+ $page=Prado::getApplication()->getPageService()->getRequestedPage();
$controls=array();
foreach($this->_tpl as $key=>$object)
{
@@ -371,11 +371,11 @@ class TTemplate extends TComponent implements ITemplate
$component->$setter($value[1]);
break;
case self::CONFIG_ASSET: // asset URL
- $url=$this->publishFilePath($this->_contextPath.'/'.$value[1]);
+ $url=Prado::getApplication()->getAssetManager()->publishFilePath($this->_contextPath.'/'.$value[1]);
$component->$setter($url);
break;
case self::CONFIG_PARAMETER: // application parameter
- $component->$setter($this->getApplication()->getParameters()->itemAt($value[1]));
+ $component->$setter(Prado::getApplication()->getParameters()->itemAt($value[1]));
break;
case self::CONFIG_LOCALIZATION:
Prado::using('System.I18N.Translation');
@@ -411,11 +411,11 @@ class TTemplate extends TComponent implements ITemplate
$component->setSubProperty($name,$value[1]);
break;
case self::CONFIG_ASSET: // asset URL
- $url=$this->publishFilePath($this->_contextPath.'/'.$value[1]);
+ $url=Prado::getApplication()->getAssetManager()->publishFilePath($this->_contextPath.'/'.$value[1]);
$component->setSubProperty($name,$url);
break;
case self::CONFIG_PARAMETER: // application parameter
- $component->setSubProperty($name,$this->getApplication()->getParameters()->itemAt($value[1]));
+ $component->setSubProperty($name,Prado::getApplication()->getParameters()->itemAt($value[1]));
break;
case self::CONFIG_LOCALIZATION:
$component->setSubProperty($name,localize($value[1]));