openrat-cms

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

Selector.class.php (838B)


      1 <?php
      2 
      3 namespace template_engine\components;
      4 
      5 class SelectorComponent extends Component
      6 {
      7 
      8 	public $types;
      9 
     10 	public $name;
     11 
     12 	public $id;
     13 
     14 	public $folderid;
     15 
     16 	public $param;
     17 
     18 	public function begin()
     19 	{
     20 		$types = $this->htmlvalue($this->types);
     21 		$name = $this->htmlvalue($this->name);
     22 		$id = $this->htmlvalue($this->id);
     23 		$folderid = $this->htmlvalue($this->folderid);
     24 		$param = $this->htmlvalue($this->param);
     25 		
     26 		echo <<<HTML
     27 <div class="selector">
     28 <div class="inputholder or-droppable">
     29 <input type="hidden" class="or-selector-link-value" name="{$param}" value="{$id}" />
     30 <input type="text" class="or-selector-link-name" value="{$name}" placeholder="{$name}" />
     31 </div>
     32 <div class="dropdown"></div>
     33 <div class="tree selector" data-types="{types}" data-init-id="{$id}" data-init-folderid="{$folderid}">
     34 </div>
     35 </div>
     36 HTML;
     37 	}
     38 }
     39 
     40 ?>