Changeset 16354
- Timestamp:
- 03/17/09 04:18:43 (4 years ago)
- Files:
-
- plugins/sfSympalPlugin/trunk/config/routing.yml (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/lib/helper/EntityHelper.php (modified) (2 diffs)
- plugins/sfSympalPlugin/trunk/lib/helper/SympalHelper.php (modified) (2 diffs)
- plugins/sfSympalPlugin/trunk/lib/renderer/entity/sfSympalEntityRenderer.class.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/modules/sympal_entity/actions/actions.class.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/modules/sympal_entity/templates/indexSuccess.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/modules/sympal_frontend/actions/actions.class.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/templates/sympal.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSympalPlugin/trunk/config/routing.yml
r16077 r16354 1 homepage: 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 1 10 sympal_homepage: 2 11 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 4 18 5 19 sympal_change_language: plugins/sfSympalPlugin/trunk/lib/helper/EntityHelper.php
r16049 r16354 1 1 <?php 2 function entity_slot( Entity$entity, $name, $type = 'Text', $defaultValue = '[Double click to edit slot content]')2 function entity_slot($entity, $name, $type = 'Text', $defaultValue = '[Double click to edit slot content]') 3 3 { 4 4 $user = sfContext::getInstance()->getUser(); … … 89 89 } 90 90 91 function render_entity_slot( EntitySlot$entitySlot)91 function render_entity_slot($entitySlot) 92 92 { 93 93 return $entitySlot->render(); plugins/sfSympalPlugin/trunk/lib/helper/SympalHelper.php
r16052 r16354 1 1 <?php 2 2 3 function get_menu_item_breadcrumbs( MenuItem$menuItem)3 function get_menu_item_breadcrumbs($menuItem) 4 4 { 5 5 return get_component('sympal_menu', 'breadcrumbs', array('menuItem' => $menuItem)); 6 6 } 7 7 8 function get_ cmf_menu($name)8 function get_sympal_menu($name) 9 9 { 10 10 return get_component('sympal_menu', 'menu', array('name' => $name)); 11 11 } 12 12 13 function get_ cmf_editor($menuItem = null, $entity = null)13 function get_sympal_editor($menuItem = null, $entity = null) 14 14 { 15 15 $menuItem = $menuItem ? $menuItem:sfSympalTools::getCurrentMenuItem(); … … 25 25 } 26 26 27 function get_ cmf_admin_bar()27 function get_sympal_admin_bar() 28 28 { 29 29 if (sfContext::getInstance()->getUser()->isAuthenticated()) plugins/sfSympalPlugin/trunk/lib/renderer/entity/sfSympalEntityRenderer.class.php
r16077 r16354 54 54 } 55 55 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() 66 57 { 67 58 $output = ''; plugins/sfSympalPlugin/trunk/modules/sympal_entity/actions/actions.class.php
r16049 r16354 13 13 public function executeIndex(sfWebRequest $request) 14 14 { 15 sfSympalConfig::set('use_query_caching', true);16 sfSympalConfig::set('use_result_caching', true);17 18 15 $sympalContext = sfSympalContext::createInstance('sympal', $this->getContext()); 19 16 $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 2 2 class sympal_frontendActions extends sfActions 3 3 { 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 18 4 public function executeSecure() 19 5 { plugins/sfSympalPlugin/trunk/templates/sympal.php
r16037 r16354 10 10 <body id="sympal"> 11 11 12 <?php echo get_ cmf_admin_bar() ?>12 <?php echo get_sympal_admin_bar() ?> 13 13 14 14 <div id="doc3" class="yui-t1"> … … 43 43 </div> 44 44 <div class="yui-b" id="sympal_primary_menu"> 45 <?php echo get_ cmf_menu('primary') ?>45 <?php echo get_sympal_menu('primary') ?> 46 46 </div> 47 47 </div> … … 51 51 </div> 52 52 <div id="sympal_footer_menu"> 53 <?php echo get_ cmf_menu('footer') ?>53 <?php echo get_sympal_menu('footer') ?> 54 54 </div> 55 55 </div> 56 56 </div> 57 57 58 <?php echo get_ cmf_editor() ?>58 <?php echo get_sympal_editor() ?> 59 59 </body> 60 60 </html>