NewssitemapController Class Reference
Created on 15.06.2007. More...
Inheritance diagram for
NewssitemapController:
Public Member Functions |
|
action_newssitemap_index ($page_data) | |
Show a sitemap index. |
|
get_routes () | |
Return array of IDispatchToken this
controller takes responsability. |
Detailed Description
Created on 15.06.2007.
Definition at line 9 of file newssitemap.controller.php.
Member Function Documentation
NewssitemapController::action_newssitemap_index | ( | $ | page_data | ) |
Show a sitemap index.
- Parameters:
-
PageData $page_data
Definition at line 24 of file newssitemap.controller.php.
00024 { 00025 $arrret = array(); 00026 EventSource::Instance()->invoke_event('newssitemap_index', '', $arrret); 00027 $c = count($arrret); 00028 if ($c == 0) { 00029 return CONTROLLER_NOT_FOUND; 00030 } 00031 $data = array(); 00032 $limt = 1000 / $c; 00033 if ($limit > 300) { $limit = 300; } 00034 foreach($arrret as $news) { 00035 $news->limit($limit); 00036 $data = array_merge($data, $news->execute()); 00037 } 00038 00039 $view = ViewFactory::create_view(IViewFactory::XML, 'core::newssitemap/index', $page_data); 00040 $view->assign('items', $data); 00041 $view->render(); 00042 }
NewssitemapController::get_routes | ( | ) |
Return array of IDispatchToken this controller takes responsability.
Reimplemented from ControllerBase.
Definition at line 13 of file newssitemap.controller.php.
00013 { 00014 return array( 00015 new ExactMatchRoute('newssitemap.xml', $this, 'newssitemap_index', new SimpleCacheManager()), 00016 ); 00017 }
The documentation for this class was generated from the following file:
- contributions/newssitemap/controller/newssitemap.controller.php