summaryrefslogtreecommitdiff
path: root/lib/prado/framework/Web/UI/WebControls/TStyle.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-04-07 16:09:16 +0200
committeremkael <emkael@tlen.pl>2016-04-07 16:09:16 +0200
commitd42b25cbf6d3f1e51cb2a3149f1ff54cc5474bc9 (patch)
tree96b734357392d6094cfc5f8284ad8f2578b96b7f /lib/prado/framework/Web/UI/WebControls/TStyle.php
parentac6c2b9c4f787dfdfa00547f764c77d80dad14c0 (diff)
* Prado upgrade (to 3.3.r6b8e6601752b21a8a96c385a5529bbec7bb2b408)
Diffstat (limited to 'lib/prado/framework/Web/UI/WebControls/TStyle.php')
-rw-r--r--lib/prado/framework/Web/UI/WebControls/TStyle.php63
1 files changed, 62 insertions, 1 deletions
diff --git a/lib/prado/framework/Web/UI/WebControls/TStyle.php b/lib/prado/framework/Web/UI/WebControls/TStyle.php
index eb47f2f..f6d91e9 100644
--- a/lib/prado/framework/Web/UI/WebControls/TStyle.php
+++ b/lib/prado/framework/Web/UI/WebControls/TStyle.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link https://github.com/pradosoft/prado
- * @copyright Copyright &copy; 2005-2015 The PRADO Group
+ * @copyright Copyright &copy; 2005-2016 The PRADO Group
* @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Web.UI.WebControls
*/
@@ -47,6 +47,27 @@ class TStyle extends TComponent
private $_displayStyle='Fixed';
/**
+ * Returns an array with the names of all variables of this object that should NOT be serialized
+ * because their value is the default one or useless to be cached for the next page loads.
+ * Reimplement in derived classes to add new variables, but remember to also to call the parent
+ * implementation first.
+ */
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_fields===array())
+ $exprops[] = "\0TStyle\0_fields";
+ if($this->_font===null)
+ $exprops[] = "\0TStyle\0_font";
+ if($this->_class===null)
+ $exprops[] = "\0TStyle\0_class";
+ if ($this->_customStyle===null)
+ $exprops[] = "\0TStyle\0_customStyle";
+ if ($this->_displayStyle==='Fixed')
+ $exprops[] = "\0TStyle\0_displayStyle";
+ }
+
+ /**
* Constructor.
* @param TStyle style to copy from
*/
@@ -463,6 +484,29 @@ class TTableStyle extends TStyle
private $_borderCollapse=null;
/**
+ * Returns an array with the names of all variables of this object that should NOT be serialized
+ * because their value is the default one or useless to be cached for the next page loads.
+ * Reimplement in derived classes to add new variables, but remember to also to call the parent
+ * implementation first.
+ */
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_backImageUrl===null)
+ $exprops[] = "\0TTableStyle\0_backImageUrl";
+ if ($this->_horizontalAlign===null)
+ $exprops[] = "\0TTableStyle\0_horizontalAlign";
+ if ($this->_cellPadding===null)
+ $exprops[] = "\0TTableStyle\0_cellPadding";
+ if ($this->_cellSpacing===null)
+ $exprops[] = "\0TTableStyle\0_cellSpacing";
+ if ($this->_gridLines===null)
+ $exprops[] = "\0TTableStyle\0_gridLines";
+ if ($this->_borderCollapse===null)
+ $exprops[] = "\0TTableStyle\0_borderCollapse";
+ }
+
+ /**
* Sets the style attributes to default values.
* This method overrides the parent implementation by
* resetting additional TTableStyle specific attributes.
@@ -691,6 +735,23 @@ class TTableItemStyle extends TStyle
private $_wrap=null;
/**
+ * Returns an array with the names of all variables of this object that should NOT be serialized
+ * because their value is the default one or useless to be cached for the next page loads.
+ * Reimplement in derived classes to add new variables, but remember to also to call the parent
+ * implementation first.
+ */
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_horizontalAlign===null)
+ $exprops[] = "\0TTableItemStyle\0_horizontalAlign";
+ if ($this->_verticalAlign===null)
+ $exprops[] = "\0TTableItemStyle\0_verticalAlign";
+ if ($this->_wrap===null)
+ $exprops[] = "\0TTableItemStyle\0_wrap";
+ }
+
+ /**
* Sets the style attributes to default values.
* This method overrides the parent implementation by
* resetting additional TTableItemStyle specific attributes.