Source for file jFormsControlDatasource.class.php
Documentation is available at jFormsControlDatasource.class.php
- <?php
- /**
- * @package jelix
- * @subpackage forms
- * @author Laurent Jouanneau
- * @contributor
- * @copyright 2006-2008 Laurent Jouanneau
- * @link http://www.jelix.org
- * @licence http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
- */
-
- /**
- * base class for controls which uses a datasource to fill their contents.
- * @package jelix
- * @subpackage forms
- */
- abstract class jFormsControlDatasource extends jFormsControl {
-
- public $type="datasource";
-
- /**
- * @var jIFormsDatasource
- */
- public $datasource;
- public $defaultValue=array();
-
- function getDisplayValue($value){
- if(is_array($value)){
- $labels = array();
- foreach($value as $val){
- $labels[$val]=$this->datasource->getLabel($val);
- }
- return $labels;
- }else{
- return $this->datasource->getLabel($value);
- }
- }
- }
Documentation generated on Thu, 22 Mar 2012 22:15:57 +0100 by phpDocumentor 1.4.3