Mage_Wishlist_Block_Share_Email_Items Class Reference

Inheritance diagram for Mage_Wishlist_Block_Share_Email_Items:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getWishlist ()
 getEscapedDescription (Varien_Object $item)
 hasDescription (Varien_Object $item)
 getFormatedDate ($date)

Protected Attributes

 $_wishlistLoaded = false


Detailed Description

Definition at line 35 of file Items.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 40 of file Items.php.

00041     {
00042         parent::__construct();
00043         $this->setTemplate('wishlist/email/items.phtml');
00044     }


Member Function Documentation

getEscapedDescription ( Varien_Object item  ) 

Definition at line 70 of file Items.php.

00071     {
00072         return nl2br($this->htmlEscape($item->getWishlistItemDescription()));
00073     }

getFormatedDate ( date  ) 

Definition at line 80 of file Items.php.

00081     {
00082         return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
00083     }

getWishlist (  ) 

Definition at line 46 of file Items.php.

00047     {
00048         if(!$this->_wishlistLoaded) {
00049             Mage::registry('wishlist')
00050                 ->loadByCustomer(Mage::getSingleton('customer/session')->getCustomer());
00051             Mage::registry('wishlist')->getProductCollection()
00052                 ->addAttributeToSelect('url_key')
00053                 ->addAttributeToSelect('name')
00054                 ->addAttributeToSelect('price')
00055                 ->addAttributeToSelect('image')
00056                 ->addAttributeToSelect('small_image')
00057                 //->addAttributeToFilter('store_id', array('in'=>Mage::registry('wishlist')->getSharedStoreIds()))
00058                 ->addStoreFilter();
00059             Mage::getSingleton('catalog/product_visibility')
00060                 ->addVisibleInSiteFilterToCollection(Mage::registry('wishlist')->getProductCollection());
00061             Mage::registry('wishlist')->getProductCollection()
00062                 ->load();
00063 
00064             $this->_wishlistLoaded = true;
00065         }
00066 
00067         return Mage::registry('wishlist')->getProductCollection();
00068     }

hasDescription ( Varien_Object item  ) 

Definition at line 75 of file Items.php.

00076     {
00077         return trim($item->getWishlistItemDescription())!='';
00078     }


Member Data Documentation

$_wishlistLoaded = false [protected]

Definition at line 38 of file Items.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:56 2009 for Magento by  doxygen 1.5.8