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