diff options
author | xue <> | 2005-11-15 15:34:38 +0000 |
---|---|---|
committer | xue <> | 2005-11-15 15:34:38 +0000 |
commit | 4c9067bf7ae89b446bb0e236ab20c5b4fa3ee3e3 (patch) | |
tree | be5b2366fdedd2d2789955deb18ef7e072ca4e6e /framework/Web/UI/TControl.php | |
parent | fdce469afc80e6cf922c07500f9b7bfd5b302c35 (diff) |
Added a new template/theme syntax for URL support.
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r-- | framework/Web/UI/TControl.php | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 21c633c7..fbdc81ee 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -69,10 +69,6 @@ class TControl extends TComponent * prefix to an ID automatically generated
*/
const AUTOMATIC_ID_PREFIX='ctl';
- /**
- * default control asset path
- */
- const ASSET_PATH='assets';
/**
* the stage of lifecycles that the control is currently at
@@ -302,26 +298,11 @@ class TControl extends TComponent return Prado::getApplication()->getUser();
}
- public function publishFile($file)
- {
- return $this->getService()->getAssetManager()->publishFile($file);
- }
-
- public function publishDirectory($directory)
- {
- return $this->getService()->getAssetManager()->publishDirectory($directory);
- }
-
- public function getAsset($assetName)
+ public function getAsset($assetPath)
{
$class=new ReflectionClass(get_class($this));
- $assetFile=dirname($class->getFileName()).'/'.self::ASSET_PATH.'/'.$assetName;
- if(is_file($assetFile))
- return $this->publishFile($assetFile);
- else if(is_dir($assetFile))
- return $this->publishDirectory($assetFile);
- else
- return '';
+ $assetPath=dirname($class->getFileName()).'/'.$assetPath;
+ return $this->getService()->getAssetManager()->publishFilePath($assetPath);
}
/**
|