Source for file ASingleWidgetLayout.php

Documentation is available at ASingleWidgetLayout.php

  1. <?
  2. /**
  3.  * ASingleWidgetLayout
  4.  *
  5.  * @package Alia
  6.  * @subpackage Layouts
  7.  */
  8.  
  9.  
  10. /**
  11.  * ASimpeLayout
  12.  *
  13.  * @package Alia
  14.  * @subpackage Layouts
  15.  */
  16.  
  17.  
  18. class ASingleWidgetLayout extends ALayout
  19. {
  20.  
  21.     /**
  22.      * render
  23.      * Randers the widget
  24.      * 
  25.      * @access public
  26.      * @return void 
  27.      */
  28.     public function render(){
  29.         $text ='';
  30.         if($this->__widgets[0instanceof AWidget)$text=$this->__widgets[0]->render();
  31.         return "<div".$this->getAttributeHTML().">$text</div>";
  32.     }
  33.  
  34.  
  35.     /**
  36.      * addWidget
  37.      * 
  38.      * @param mixed $widget 
  39.      * @access public
  40.      * @return void 
  41.      */
  42.     public function addWidget($widget,$key=null){
  43.         $this->__widgets[0$widget;
  44.     }
  45.  
  46.  
  47. // end of ASimpleLayout
  48. ?>

Documentation generated on Fri, 11 Jul 2008 13:28:43 -0400 by phpDocumentor 1.4.2