X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=gui%2Fbaculum%2Fframework%2FWeb%2FUI%2FWebControls%2FTListItem.php;h=0118a9178cb482468797b69a5dea9a4eca0c91ef;hb=2f10e42cf4544d881e16b22051aca6d87331322a;hp=cf5e487a0b56fa1efefdbcdb2460ef7846e8c610;hpb=591fcc55ecd759cd56942a2c45a21dec7eadb3ab;p=bacula%2Fbacula diff --git a/gui/baculum/framework/Web/UI/WebControls/TListItem.php b/gui/baculum/framework/Web/UI/WebControls/TListItem.php index cf5e487a0b..0118a9178c 100644 --- a/gui/baculum/framework/Web/UI/WebControls/TListItem.php +++ b/gui/baculum/framework/Web/UI/WebControls/TListItem.php @@ -3,9 +3,9 @@ * TListItem class file * * @author Qiang Xue - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2014 PradoSoft - * @license http://www.pradosoft.com/license/ + * @link https://github.com/pradosoft/prado + * @copyright Copyright © 2005-2016 The PRADO Group + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -32,19 +32,19 @@ class TListItem extends TComponent /** * @var string text of the item */ - private $_text; + private $_text=''; /** * @var string value of the item */ - private $_value; + private $_value=''; /** * @var boolean whether the item is enabled */ - private $_enabled; + private $_enabled=true; /** * @var boolean whether the item is selected */ - private $_selected; + private $_selected=false; /** * Constructor. @@ -61,6 +61,27 @@ class TListItem extends TComponent $this->setSelected($selected); } + /** + * 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->_attributes===null) + $exprops[] = "\0TListItem\0_attributes"; + if($this->_text==='') + $exprops[] = "\0TListItem\0_text"; + if($this->_value==='') + $exprops[] = "\0TListItem\0_value"; + if ($this->_enabled===true) + $exprops[] = "\0TListItem\0_enabled"; + if ($this->_selected===false) + $exprops[] = "\0TListItem\0_selected"; + } + /** * @return boolean whether the item is enabled */