1: <?php
2: /**
3: * JqButtonCheckBox Base File
4: *
5: * The QJqCheckBoxBase class defined here provides an interface between the generated
6: * QJqCheckBoxGen class, and QCubed. This file is part of the core and will be overwritten
7: * when you update QCubed. To override, make your changes to the QJqCheckBox.class.php file instead.
8: *
9: */
10:
11: /**
12: * Implements a JQuery Ui Check Box
13: *
14: * Use this as if you were creating a standard check box.
15: *
16: * One of the QJqCheckBoxGen properties use the same names as standard QCubed properties.
17: * The text property is a boolean in the JqUi object that specifies whether
18: * to show text or just icons (provided icons are defined), and the Label property overrides
19: * the standard HTML of the button. Because of the name conflict, the JQ UI property is called
20: * ->JqText. You can also use ShowText as an alias to this as well so that your code is more readable.
21: * Text = standard html text of button
22: * Label = override of standard HTML text, if you want a button to say something different when JS is on or off
23: * ShowText = whether or not to hide the text of the button when icons are set
24: *
25: * @property boolean $ShowText Causes text to be shown when icons are also defined.
26: *
27: * @link http://jqueryui.com/button/#checkbox
28: * @package Controls\Base
29: */
30: class QJqCheckBoxBase extends QJqCheckBoxGen
31: {
32: public function __get($strName) {
33: switch ($strName) {
34: case 'ShowText': return $this->JqText;
35: default:
36: try {
37: return parent::__get($strName);
38: } catch (QCallerException $objExc) {
39: $objExc->IncrementOffset();
40: throw $objExc;
41: }
42: }
43: }
44:
45: public function __set($strName, $mixValue) {
46: switch ($strName) {
47: case 'ShowText': // true if the text should be shown when icons are defined
48: $this->JqText = $mixValue;
49: break;
50:
51: default:
52: try {
53: parent::__set($strName, $mixValue);
54: } catch (QCallerException $objExc) {
55: $objExc->IncrementOffset();
56: throw $objExc;
57: }
58: break;
59:
60: }
61: }
62:
63: }