Skip to content

Commit 48fe4d8

Browse files
authored
Mage_Rss - DOC block update (#1406)
1 parent a703c8a commit 48fe4d8

File tree

18 files changed

+107
-20
lines changed

18 files changed

+107
-20
lines changed

app/code/core/Mage/Rss/Block/Abstract.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,18 @@
2323
* @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
26+
27+
/**
28+
* Class Mage_Rss_Block_Abstract
29+
*
30+
* @method int getStoreId()
31+
*/
2632
class Mage_Rss_Block_Abstract extends Mage_Core_Block_Template
2733
{
34+
/**
35+
* @return int
36+
* @throws Mage_Core_Model_Store_Exception
37+
*/
2838
protected function _getStoreId()
2939
{
3040
//store id is store view id
@@ -35,6 +45,10 @@ protected function _getStoreId()
3545
return $storeId;
3646
}
3747

48+
/**
49+
* @return int
50+
* @throws Exception
51+
*/
3852
protected function _getCustomerGroupId()
3953
{
4054
//customer group id

app/code/core/Mage/Rss/Block/Catalog/Category.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ protected function _construct()
4646
$this->setCacheLifetime(600);
4747
}
4848

49+
/**
50+
* @return string
51+
* @throws Mage_Core_Exception
52+
* @throws Mage_Core_Model_Store_Exception
53+
*/
4954
protected function _toHtml()
5055
{
5156
$categoryId = $this->getRequest()->getParam('cid');

app/code/core/Mage/Rss/Block/Catalog/New.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ protected function _construct()
4242
//$this->setCacheLifetime(600);
4343
}
4444

45+
/**
46+
* @return string
47+
* @throws Mage_Core_Exception
48+
* @throws Mage_Core_Model_Store_Exception
49+
* @throws Zend_Date_Exception
50+
*/
4551
protected function _toHtml()
4652
{
4753
$storeId = $this->_getStoreId();

app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ protected function _toHtml()
7878
$globalNotifyStockQty = (float) Mage::getStoreConfig(
7979
Mage_CatalogInventory_Model_Stock_Item::XML_PATH_NOTIFY_STOCK_QTY);
8080
Mage::helper('rss')->disableFlat();
81-
/* @var $product Mage_Catalog_Model_Product */
81+
/* @var Mage_Catalog_Model_Product $product */
8282
$product = Mage::getModel('catalog/product');
83-
/* @var $collection Mage_Catalog_Model_Resource_Product_Collection */
8483
$collection = $product->getCollection();
8584
Mage::getResourceModel('cataloginventory/stock')->addLowStockFilter($collection, array(
8685
'qty',

app/code/core/Mage/Rss/Block/Catalog/Salesrule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ protected function _toHtml()
5858
$lang = Mage::getStoreConfig('general/locale/code');
5959
$title = Mage::helper('rss')->__('%s - Discounts and Coupons',Mage::app()->getStore($storeId)->getName());
6060

61-
/** @var $rssObject Mage_Rss_Model_Rss */
61+
/** @var Mage_Rss_Model_Rss $rssObject */
6262
$rssObject = Mage::getModel('rss/rss');
63-
/** @var $collection Mage_SalesRule_Model_Resource_Rule_Collection */
63+
/** @var Mage_SalesRule_Model_Resource_Rule_Collection $collection */
6464
$collection = Mage::getModel('salesrule/rule')->getResourceCollection();
6565

6666
$data = array(

app/code/core/Mage/Rss/Block/Catalog/Special.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ protected function _construct()
4949
$this->setCacheLifetime(600);
5050
}
5151

52+
/**
53+
* @return string
54+
* @throws Mage_Core_Model_Store_Exception
55+
*/
5256
protected function _toHtml()
5357
{
5458
//store id is store view id
@@ -187,8 +191,8 @@ public function addSpecialXmlCallback($args)
187191
/**
188192
* Function for comparing two items in collection
189193
*
190-
* @param Varien_Object $item1
191-
* @param Varien_Object $item2
194+
* @param Varien_Object $a
195+
* @param Varien_Object $b
192196
* @return boolean
193197
*/
194198
public function sortByStartDate($a, $b)

app/code/core/Mage/Rss/Block/Catalog/Tag.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ protected function _construct()
4545
$this->setCacheLifetime(600);
4646
}
4747

48+
/**
49+
* @return string
50+
* @throws Mage_Core_Model_Store_Exception
51+
*/
4852
protected function _toHtml()
4953
{
5054
//store id is store view id

app/code/core/Mage/Rss/Block/List.php

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Mage_Rss_Block_List extends Mage_Core_Block_Template
4545
*/
4646
protected function _prepareLayout()
4747
{
48+
/** @var Mage_Page_Block_Html_Head $head */
4849
$head = $this->getLayout()->getBlock('head');
4950
$feeds = $this->getRssMiscFeeds();
5051
if ($head && !empty($feeds)) {
@@ -58,7 +59,7 @@ protected function _prepareLayout()
5859
/**
5960
* Retrieve rss feeds
6061
*
61-
* @return array
62+
* @return array|false
6263
*/
6364
public function getRssFeeds()
6465
{
@@ -68,9 +69,12 @@ public function getRssFeeds()
6869
/**
6970
* Add new rss feed
7071
*
71-
* @param string $url
72-
* @param string $label
73-
* @return Mage_Core_Helper_Abstract
72+
* @param string $url
73+
* @param string $label
74+
* @param array $param
75+
* @param bool $customerGroup
76+
* @return $this
77+
* @throws Mage_Core_Model_Store_Exception
7478
*/
7579
public function addRssFeed($url, $label, $param = array(), $customerGroup=false)
7680
{
@@ -93,11 +97,18 @@ public function resetRssFeed()
9397
$this->_rssFeeds=array();
9498
}
9599

100+
/**
101+
* @return int
102+
* @throws Mage_Core_Model_Store_Exception
103+
*/
96104
public function getCurrentStoreId()
97105
{
98106
return Mage::app()->getStore()->getId();
99107
}
100108

109+
/**
110+
* @return int
111+
*/
101112
public function getCurrentCustomerGroupId()
102113
{
103114
return Mage::getSingleton('customer/session')->getCustomerGroupId();
@@ -130,6 +141,9 @@ public function getRssCatalogFeeds()
130141
*/
131142
}
132143

144+
/**
145+
* @return array|false
146+
*/
133147
public function getRssMiscFeeds()
134148
{
135149
$this->resetRssFeed();
@@ -183,7 +197,7 @@ public function CategoriesRssFeed()
183197
if((bool)Mage::getStoreConfig($path)){
184198
$category = Mage::getModel('catalog/category');
185199

186-
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
200+
/* @var Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection $collection */
187201
$treeModel = $category->getTreeModel()->loadNode(Mage::app()->getStore()->getRootCategoryId());
188202
$nodes = $treeModel->loadChildren()->getChildren();
189203

app/code/core/Mage/Rss/Block/Order/New.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ protected function _construct()
5151
$this->setCacheLifetime(600);
5252
}
5353

54+
/**
55+
* @return string
56+
* @throws Mage_Core_Exception
57+
*/
5458
protected function _toHtml()
5559
{
5660
$order = Mage::getModel('sales/order');
@@ -82,6 +86,9 @@ protected function _toHtml()
8286
return $rssObj->createRssXml();
8387
}
8488

89+
/**
90+
* @param array $args
91+
*/
8592
public function addNewOrderXmlCallback($args)
8693
{
8794
$rssObj = $args['rssObj'];

app/code/core/Mage/Rss/Block/Order/Status.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ protected function _construct()
4242
$this->setCacheLifetime(600);
4343
}
4444

45+
/**
46+
* @return string
47+
*/
4548
protected function _toHtml()
4649
{
4750
$rssObj = Mage::getModel('rss/rss');

0 commit comments

Comments
 (0)