diff options
author | xue <> | 2006-02-15 01:38:39 +0000 |
---|---|---|
committer | xue <> | 2006-02-15 01:38:39 +0000 |
commit | 2b194248b9bbd75887c1d5f991dca1f3fd441dd5 (patch) | |
tree | 833dc5c56d702d5188b383d3124759965d9b972f /framework/Web/UI/TControl.php | |
parent | cd1ffb47a6c07deda47052eff80452e78a52495d (diff) |
Added SourceTemplateControl property for TControl.
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r-- | framework/Web/UI/TControl.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 50648d93..6fd25f76 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -256,6 +256,22 @@ class TControl extends TComponent }
/**
+ * @return TTemplateControl the control whose template is loaded from
+ * some external storage, such as file, db, and whose template ultimately
+ * contains this control.
+ */
+ public function getSourceTemplateControl()
+ {
+ $control=$this;
+ while(($control instanceof TControl) && ($control=$control->getTemplateControl())!==null)
+ {
+ if(($control instanceof TTemplateControl) && $control->getIsSourceTemplateControl())
+ return $control;
+ }
+ return $this->getPage();
+ }
+
+ /**
* Publishes a private asset and gets its URL.
* This method will publish a private asset (file or directory)
* and gets the URL to the asset. Note, if the asset refers to
|