Mage_GoogleBase_Block_Adminhtml_Items_Renderer_Id Class Reference

Inheritance diagram for Mage_GoogleBase_Block_Adminhtml_Items_Renderer_Id:

Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract Mage_Adminhtml_Block_Abstract Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 render (Varien_Object $row)


Detailed Description

Definition at line 35 of file Id.php.


Member Function Documentation

render ( Varien_Object row  ) 

Renders Google Base Item Id

Parameters:
Varien_Object $row
Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.

Definition at line 44 of file Id.php.

00045     {
00046         $baseUrl = 'http://www.google.com/base/step2offer?docId=';
00047 
00048         $itemUrl = $row->getData($this->getColumn()->getIndex());
00049         $urlParts = parse_url($itemUrl);
00050         if (isset($urlParts['path'])) {
00051             $pathParts = explode('/', $urlParts['path']);
00052             $itemId = $pathParts[count($pathParts) - 1];
00053         } else {
00054             $itemId = $itemUrl;
00055         }
00056         $title = $this->__('View Item in Google Base');
00057 
00058         return sprintf('<a href="%s" alt="%s" title="%s" target="_blank">%s</a>', $baseUrl . $itemId, $title, $title, $itemId);
00059     }


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

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