Source for file jFormsControlSwitch.class.php

Documentation is available at jFormsControlSwitch.class.php

  1. <?php
  2. /**
  3. * @package     jelix
  4. * @subpackage  forms
  5. * @author      Laurent Jouanneau
  6. * @contributor
  7. * @copyright   2006-2008 Laurent Jouanneau
  8. * @link        http://www.jelix.org
  9. * @licence     http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
  10. */
  11.  
  12. /**
  13.  * switch
  14.  * @package     jelix
  15.  * @subpackage  forms
  16.  * @experimental
  17.  */
  18. class jFormsControlSwitch extends jFormsControlChoice {
  19.     public $type="switch";
  20.  
  21.  
  22.     function setValueFromRequest($request) {
  23.         //$this->setData($request->getParam($this->ref,''));
  24.         if(isset($this->items[$this->container->data[$this->ref]])){
  25.             foreach($this->items[$this->container->data[$this->ref]] as $name=>$ctrl) {
  26.                 $ctrl->setValueFromRequest($request);
  27.             }
  28.         }
  29.     }
  30. }

Documentation generated on Thu, 22 Mar 2012 22:16:03 +0100 by phpDocumentor 1.4.3