Orion PHP  0.11.12
The PHP5.3 framework
linkonemany.php
Go to the documentation of this file.
00001 <?php
00002 namespace Orion\Core\Model;
00003 
00004 
00005 class LinkOneMany extends Link
00006 {
00007     /**
00008      * Link One-One model field
00009      * @param string $bind
00010      * @param string $label
00011      * @param boolean $primary
00012      */
00013     public function __construct($bind, $label, $model, $rightfield='id')
00014     {
00015         parent::__construct($bind, $label, $model, $rightfield, $rightfield, false, false);
00016         $this->type = 'link-one-many';
00017     }
00018     
00019     public function toHtml($XHTML=true)
00020     {
00021         if($XHTML)
00022             $tag = ' /';
00023         else
00024             $tag = '';
00025         
00026         return '<input name="'.$this->bind.'" type="hidden" value="'.$this->value.'"'.$tag.'>';
00027     }
00028 
00029 }
00030 
00031 ?>