Development

Changeset 3947

You must first sign up to be able to contribute.

Changeset 3947

Show
Ignore:
Timestamp:
05/07/07 16:09:51 (6 years ago)
Author:
Jonathan.Wage
Message:

sfThreeColumnLayoutHelperPlugin: Initial entry of some files moved over from main project directory.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfThreeColumnLayoutHelperPlugin/lib/helper/ThreeColumnLayoutHelper.php

    r3912 r3947  
    11<?php 
     2sfContext::getInstance()->getResponse()->addStylesheet('/sfThreeColumnLayoutHelperPlugin/css/three_column_layout_helper'); 
     3 
    24/** 
    35 * Get Default Slot 
     
    3840  { 
    3941    // This is a symfony core function 
    40     $slot = get_slot($slotName); 
    41      
    42     if( $slot != 'disabled' ) 
    43     { 
    44       if( !$slot ) 
    45       { 
    46         $slot = get_default_slot($column, $num); 
    47       }      
    48     } 
     42    $slot = get_slot($slotName);     
    4943  } else { 
    5044    $slot = get_default_slot($column, $num); 
     
    8478function get_layout_column($column, $numSlots = 5) 
    8579{ 
    86  $slots = ''; 
     80  $slots = ''; 
    8781  for($i = 1; $i <= $numSlots; $i++) 
    8882  { 
     
    9286  // If we have slots for the column then lets wrap it and return it 
    9387  if( $slots ) 
    94   { 
    95    $html  = '<div id="'.$column.'_column">'; 
     88  {   
     89    $html  = '<div id="'.$column.'_column">'; 
    9690    $html .= $slots; 
    9791    $html .= '</div>'; 
     
    116110{ 
    117111  disable_layout_column_slots($column); 
    118   sfContext::getInstance()->getResponse()->addStylesheet('disable_'.$column.'_column'); 
     112  sfContext::getInstance()->getResponse()->addStylesheet('/sfThreeColumnLayoutHelperPlugin/css/disable_'.$column.'_column'); 
    119113} 
    120114 
     
    222216  return $column.'_column_slot_'.$num; 
    223217} 
     218 
     219/** 
     220 * get_layout_content_wrapper  
     221 *  
     222 * @param mixed $sf_data  
     223 * @access public 
     224 * @return void 
     225 */ 
     226function get_layout_content_wrapper($sf_data) 
     227{ 
     228  $html  = get_layout_slot('outer_top', 1); 
     229 
     230  $html .= '<div id="content_wrapper"> 
     231           <div id="content">'; 
     232 
     233  $html .= get_layout_slot('inner_top', 1); 
     234   
     235  $html .= $sf_data->getRaw('sf_content'); 
     236 
     237  $html .= get_layout_slot('inner_bottom', 1); 
     238 
     239  $html .= '<br/></div></div>'; 
     240   
     241  $html .= get_layout_slot('outer_bottom', 1); 
     242 
     243  return $html; 
     244} 
     245 
     246/** 
     247 * get_three_column_layout  
     248 *  
     249 * @param mixed $sf_data  
     250 * @access public 
     251 * @return void 
     252 */ 
     253function get_three_column_layout($sf_data) 
     254{ 
     255  $html  = get_layout_column('left'); 
     256  $html .= get_layout_column('right'); 
     257   
     258  $html .= get_layout_content_wrapper($sf_data); 
     259 
     260  return $html; 
     261}