Development

Changeset 16354

You must first sign up to be able to contribute.

Changeset 16354

Show
Ignore:
Timestamp:
03/17/09 04:18:43 (4 years ago)
Author:
Jonathan.Wage
Message:

[1.0] sfSympalPlugin: A few misc. bug fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfSympalPlugin/trunk/config/routing.yml

    r16077 r16354  
     1homepage: 
     2  url:   / 
     3  param: { module: sympal_entity, action: index, slug: home, type: page } 
     4  class: sfDoctrineRoute 
     5  options: 
     6    model:  Entity 
     7    type:   object 
     8    method: getEntity 
     9 
    110sympal_homepage: 
    211  url:   / 
    3   param: { module: sympal_frontend, action: index } 
     12  param: { module: sympal_entity, action: index, slug: home, type: page } 
     13  class: sfDoctrineRoute 
     14  options: 
     15    model:  Entity 
     16    type:   object 
     17    method: getEntity 
    418 
    519sympal_change_language: 
  • plugins/sfSympalPlugin/trunk/lib/helper/EntityHelper.php

    r16049 r16354  
    11<?php 
    2 function entity_slot(Entity $entity, $name, $type = 'Text', $defaultValue = '[Double click to edit slot content]') 
     2function entity_slot($entity, $name, $type = 'Text', $defaultValue = '[Double click to edit slot content]') 
    33{ 
    44  $user = sfContext::getInstance()->getUser(); 
     
    8989} 
    9090 
    91 function render_entity_slot(EntitySlot $entitySlot) 
     91function render_entity_slot($entitySlot) 
    9292{ 
    9393  return $entitySlot->render(); 
  • plugins/sfSympalPlugin/trunk/lib/helper/SympalHelper.php

    r16052 r16354  
    11<?php 
    22 
    3 function get_menu_item_breadcrumbs(MenuItem $menuItem) 
     3function get_menu_item_breadcrumbs($menuItem) 
    44{ 
    55  return get_component('sympal_menu', 'breadcrumbs', array('menuItem' => $menuItem)); 
    66} 
    77 
    8 function get_cmf_menu($name) 
     8function get_sympal_menu($name) 
    99{ 
    1010  return get_component('sympal_menu', 'menu', array('name' => $name)); 
    1111} 
    1212 
    13 function get_cmf_editor($menuItem = null, $entity = null) 
     13function get_sympal_editor($menuItem = null, $entity = null) 
    1414{ 
    1515  $menuItem = $menuItem ? $menuItem:sfSympalTools::getCurrentMenuItem(); 
     
    2525} 
    2626 
    27 function get_cmf_admin_bar() 
     27function get_sympal_admin_bar() 
    2828{ 
    2929  if (sfContext::getInstance()->getUser()->isAuthenticated()) 
  • plugins/sfSympalPlugin/trunk/lib/renderer/entity/sfSympalEntityRenderer.class.php

    r16077 r16354  
    5454  } 
    5555 
    56   public function __toString() 
    57   { 
    58     try { 
    59       return (string) $this->_render(); 
    60     } catch (Exception $e) { 
    61       die($e->getMessage()); 
    62     } 
    63   } 
    64  
    65   protected function _render() 
     56  public function render() 
    6657  { 
    6758    $output = ''; 
  • plugins/sfSympalPlugin/trunk/modules/sympal_entity/actions/actions.class.php

    r16049 r16354  
    1313  public function executeIndex(sfWebRequest $request) 
    1414  { 
    15     sfSympalConfig::set('use_query_caching', true); 
    16     sfSympalConfig::set('use_result_caching', true); 
    17  
    1815    $sympalContext = sfSympalContext::createInstance('sympal', $this->getContext()); 
    1916    $this->renderer = $sympalContext->getRenderer($this); 
  • plugins/sfSympalPlugin/trunk/modules/sympal_entity/templates/indexSuccess.php

    r16037 r16354  
    1 <?php echo $renderer ?> 
     1<?php echo $renderer->render() ?> 
  • plugins/sfSympalPlugin/trunk/modules/sympal_frontend/actions/actions.class.php

    r16050 r16354  
    22class sympal_frontendActions extends sfActions 
    33{ 
    4   public function preExecute() 
    5   { 
    6     sfSympalTools::changeLayout(sfSympalConfig::get('default_layout')); 
    7   } 
    8  
    9   public function executeIndex() 
    10   { 
    11     sfSympalConfig::set('use_query_caching', true); 
    12     sfSympalConfig::set('use_result_caching', true); 
    13  
    14     $sympalContext = sfSympalContext::createInstance('sympal', $this->getContext()); 
    15     $this->renderer = $sympalContext->quickRenderEntity('home'); 
    16   } 
    17  
    184  public function executeSecure() 
    195  { 
  • plugins/sfSympalPlugin/trunk/templates/sympal.php

    r16037 r16354  
    1010<body id="sympal"> 
    1111 
    12   <?php echo get_cmf_admin_bar() ?> 
     12  <?php echo get_sympal_admin_bar() ?> 
    1313 
    1414  <div id="doc3" class="yui-t1"> 
     
    4343      </div> 
    4444      <div class="yui-b" id="sympal_primary_menu"> 
    45         <?php echo get_cmf_menu('primary') ?> 
     45        <?php echo get_sympal_menu('primary') ?> 
    4646      </div> 
    4747    </div> 
     
    5151      </div> 
    5252      <div id="sympal_footer_menu"> 
    53         <?php echo get_cmf_menu('footer') ?> 
     53        <?php echo get_sympal_menu('footer') ?> 
    5454      </div> 
    5555    </div> 
    5656  </div> 
    5757 
    58   <?php echo get_cmf_editor() ?> 
     58  <?php echo get_sympal_editor() ?> 
    5959</body> 
    6060</html>