openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

Radiobox.class.php (543B)


      1 <?php
      2 
      3 namespace template_engine\components;
      4 
      5 class RadioboxComponent extends Component
      6 {
      7 
      8 	public $list;
      9 
     10 	public $name;
     11 
     12 	public $default;
     13 
     14 	public $onchange;
     15 
     16 	public $title;
     17 
     18 	public $class;
     19 	
     20 	public function begin()
     21 	{
     22 		$this->includeResource( 'radiobox/component-radio-box.php');
     23 		
     24 		if	( isset($this->default))
     25 			$value = $this->value($this->default);
     26 		else
     27 			$value = '$'.$this->varname($this->name);
     28 					
     29 		echo '<?php component_radio_box('.$this->value($this->name).',$'.$this->varname($this->list).','.$value.') ?>';
     30 	}
     31 }
     32 
     33 ?>