summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php
diff options
context:
space:
mode:
authorxue <>2006-02-05 23:38:21 +0000
committerxue <>2006-02-05 23:38:21 +0000
commit84a6c667801d46c4cb6f831c9e40043b308f96d8 (patch)
tree0219a6ac8191f690645f35ba8ac4bab65e63bbe2 /demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php
parent56b4436587f7e85c7ec1a8edb44b1d37506fbf38 (diff)
Added two examples showing creating new controls by composition.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php b/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php
new file mode 100644
index 00000000..999639d7
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php
@@ -0,0 +1,18 @@
+<?php
+
+class LabeledTextBox extends TTemplateControl
+{
+ public function getLabel()
+ {
+ $this->ensureChildControls();
+ return $this->getRegisteredObject('Label');
+ }
+
+ public function getTextBox()
+ {
+ $this->ensureChildControls();
+ return $this->getRegisteredObject('TextBox');
+ }
+}
+
+?> \ No newline at end of file