Development

Changeset 4005

You must first sign up to be able to contribute.

Changeset 4005

Show
Ignore:
Timestamp:
05/15/07 01:22:54 (1 year ago)
Author:
Jonathan.Wage
Message:

sfDataGridPlugin: Not sure.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDataGridPlugin/lib/BasesfDataGrid.class.php

    r3945 r4005  
    298298   
    299299  /** 
    300    * Title Row Content Getter Vars 
    301    * 
    302    * Array of variables to be passed to the content getter 
    303    *  
    304    * @var array 
    305    * @access public 
    306    */ 
    307   public $titleRowContentGetterVars = array(); 
    308  
    309    
    310   /** 
    311300   * Footer Row Content Getter 
    312301   * 
     
    324313   */ 
    325314  public $footerRowContentGetter; 
    326    
    327   /** 
    328    * Footer Row Content Getter Vars 
    329    * 
    330    * Array of variables to be passed to the content getter 
    331    *  
    332    * @var array 
    333    * @access public 
    334    */ 
    335   public $footerRowContentGetterVars = array(); 
    336  
    337   /** 
     315  
     316 /** 
    338317   * Holds the Doctrine_Query object 
    339318   *  
     
    705684    foreach($this AS $key => $value) 
    706685    { 
    707       $newValue = sfConfig::get('app_tabbed_content_'.sfInflector::underscore($key)); 
     686      $newValue = sfConfig::get('app_data_grid_'.sfInflector::underscore($key)); 
    708687 
    709688      if( isset($newValue) && $newValue != $value ) 
     
    896875    }  
    897876  } 
    898    
    899   public function setTitleRowContentGetter($contentGetter, $vars = null) 
    900   { 
    901     $this->titleRowContentGetter = $contentGetter; 
    902  
    903     if( $vars ) 
    904     { 
    905       $this->setTitleRowContentGetterVars($vars); 
    906     } 
    907   } 
    908  
    909   public function setFooterRowContentGetter($contentGetter, $vars = null) 
    910   { 
    911     $this->footerRowContentGetter = $contentGetter; 
    912  
    913     if( $vars ) 
    914     {       
    915       $this->setFooterRowContentGetterVars($vars); 
    916     } 
    917   } 
    918877 
    919878  /** 
     
    12051164    if( $this->getShowFooter() ) 
    12061165    { 
    1207       if( !$this->getFooterRowContentGetter() ) 
     1166      if( $this->getFooterRowContentGetter() ) 
    12081167      { 
    1209         $html  = "\n\n".'<div class="data_grid_form_footer"  id="'.$this->getFormId().'_form_footer">'."\n"; 
     1168        $html = sfContentGetter::getInstance($this->getFooterRowContentGetter(), array('dataGrid' => $this), $this->getModuleName())->output(); 
     1169      } else { 
     1170        $html  = "\n\n".'<div class="data_grid_form_footer"  id="'.$this->getFormId().'_form_footer">'."\n"; 
    12101171     
    12111172        if( !empty($this->array) ) 
     
    12161177         
    12171178        $html .= '<br/></div>'."\n\n"; 
    1218       } else { 
    1219         $vars = array_merge(array('dataGrid' => $this), $this->getFooterRowContentGetterVars()); 
    1220  
    1221         $html = sfContentGetter::getInstance($this->getFooterRowContentGetter(), $vars, $this->getModuleName())->output(); 
    1222       } 
    1223  
    1224       return $html; 
     1179      } 
     1180       
     1181      return $html; 
    12251182    } 
    12261183  } 
     
    15691526    if( $this->getShowTitle() ) 
    15701527    { 
    1571       if( !$this->getTitleRowContentGetter() AND $title = $this->getRenderedTitle() ) 
     1528      if( $this->getTitleRowContentGetter() ) 
    15721529      { 
    1573         return '<div class="data_grid_title_row" id="'.$this->getId().'_data_grid_title_row">'.$this->getCollapseIcon().'<div class="data_grid_title_wrapper">'.$title.'</div></div>'."\n"; 
     1530        return sfContentGetter::getInstance($this->getTitleRowContentGetter(), array('dataGrid' => $this), $this->getModuleName())->output(); 
     1531      } else { 
     1532        return '<div class="data_grid_title_row" id="'.$this->getId().'_data_grid_title_row">'.$this->getCollapseIcon().'<div class="data_grid_title_wrapper">'.$this->getRenderedTitle($this->getTitle()).'</div></div>'."\n"; 
    15741533      } 
    1575       else if( $contentGetter = $this->getTitleRowContentGetter() ) 
    1576       { 
    1577         $vars = array_merge(array('dataGrid' => $this, 'title' => $this->getRenderedTitle()), $this->getTitleRowContentGetterVars()); 
    1578          
    1579         return sfContentGetter::getInstance($contentGetter, $vars, $this->getModuleName())->output(); 
    1580       } 
    15811534    } 
    15821535  }