diff options
author | xue <> | 2006-02-05 23:38:21 +0000 |
---|---|---|
committer | xue <> | 2006-02-05 23:38:21 +0000 |
commit | 84a6c667801d46c4cb6f831c9e40043b308f96d8 (patch) | |
tree | 0219a6ac8191f690645f35ba8ac4bab65e63bbe2 /demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox1/LabeledTextBox.php | |
parent | 56b4436587f7e85c7ec1a8edb44b1d37506fbf38 (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.php | 18 |
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 |