|
Revision 2560, 1.4 KB
(checked in by johnnyoffline, 3 years ago)
|
|
Merged all of aBlog.css into a-engines.css in Apostrophe yesterday.
This commit removes all of the includeStylesheet calls for aBlog.css from the plugin.
|
| Rev | Line | |
|---|
| [860] | 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * Base Components for the apostropheBlogPlugin aEvent module. |
|---|
| 5 | * |
|---|
| 6 | * @package apostropheBlogPlugin |
|---|
| 7 | * @subpackage aEvent |
|---|
| 8 | * @author Dan Ordille |
|---|
| 9 | */ |
|---|
| 10 | abstract class BaseaEventComponents extends sfComponents |
|---|
| 11 | { |
|---|
| 12 | protected $modelClass = 'aEvent'; |
|---|
| [1379] | 13 | |
|---|
| [1387] | 14 | public function setup() |
|---|
| [1379] | 15 | { |
|---|
| [1387] | 16 | parent::setup(); |
|---|
| [1379] | 17 | if(sfConfig::get('app_aBlog_use_bundled_assets', true)) |
|---|
| 18 | { |
|---|
| 19 | $this->getResponse()->addJavascript('/apostropheBlogPlugin/js/aBlog.js'); |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
| [860] | 22 | |
|---|
| 23 | public function executeSidebar() |
|---|
| 24 | { |
|---|
| 25 | if ($this->getRequestParameter('tag')) |
|---|
| 26 | { |
|---|
| [2377] | 27 | $this->tag = Doctrine::getTable('Tag')->findOrCreateByTagname($this->getRequestParameter('tag')); |
|---|
| [860] | 28 | } |
|---|
| 29 | |
|---|
| [1276] | 30 | if(!count($this->categories) || is_null($this->categories)) |
|---|
| [1227] | 31 | { |
|---|
| [2267] | 32 | $this->categories = Doctrine::getTable('aCategory') |
|---|
| [1227] | 33 | ->createQuery('c') |
|---|
| 34 | ->orderBy('c.name') |
|---|
| 35 | ->where('c.events = ?', true) |
|---|
| 36 | ->execute(); |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| [1244] | 39 | $categoryIds = array(); |
|---|
| 40 | foreach($this->categories as $category) |
|---|
| 41 | { |
|---|
| 42 | $categoryIds[] = $category['id']; |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| [2267] | 45 | $this->popular = Doctrine::getTable('aBlogItem')->getTagsForCategories($categoryIds, 'aEvent', true, 10); |
|---|
| 46 | $this->tags = Doctrine::getTable('aBlogItem')->getTagsForCategories($categoryIds, 'aEvent'); |
|---|
| [1244] | 47 | |
|---|
| [1128] | 48 | if($this->reset == true) |
|---|
| 49 | { |
|---|
| 50 | $this->params['cat'] = array(); |
|---|
| 51 | $this->params['tag'] = array(); |
|---|
| 52 | } |
|---|
| [860] | 53 | } |
|---|
| [1128] | 54 | |
|---|
| [860] | 55 | } |
|---|