root/trunk/apps/snippets/modules/sidebar/actions/components.class.php

Revision 7, 505 bytes (checked in by francois, 4 years ago)

refactored sidebar module and added latest comments in sidebar (+feed)

Line 
1 <?php
2
3 class sidebarComponents extends sfComponents
4 {
5   /**
6    * Executes index action
7    *
8    */
9   public function executeListAll()
10   {
11     $this->tags = SnippetTagPeer::getAllWithCount();
12     $this->comments = SnippetCommentPeer::getLatests(sfConfig::get('app_sidebar_comments'));
13   }
14
15   public function executeListRelated()
16   {
17     $this->associated_tags = $this->getRequest()->getAttribute('associated_tags');
18     $this->tags = $this->getRequest()->getAttribute('tags');
19   }
20 }
21
22 ?>
Note: See TracBrowser for help on using the browser.