Mage_Core_Block_Text_List_Link Class Reference

Inheritance diagram for Mage_Core_Block_Text_List_Link:

Mage_Core_Block_Text Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 setLink ($liParams, $aParams, $innerText, $afterText='')

Protected Member Functions

 _toHtml ()


Detailed Description

Base html block

Author:
Magento Core Team <core@magentocommerce.com>

Definition at line 33 of file Link.php.


Member Function Documentation

_toHtml (  )  [protected]

Override this method in descendants to produce html

Returns:
string

Reimplemented from Mage_Core_Block_Text.

Definition at line 45 of file Link.php.

00046     {
00047         $this->setText('<li');
00048         $params = $this->getLiParams();
00049         if (!empty($params) && is_array($params)) {
00050             foreach ($params as $key=>$value) {
00051                 $this->addText(' '.$key.'="'.addslashes($value).'"');
00052             }
00053         } elseif (is_string($params)) {
00054             $this->addText(' '.$params);
00055         }
00056         $this->addText('><a');
00057 
00058         $params = $this->getAParams();
00059         if (!empty($params) && is_array($params)) {
00060             foreach ($params as $key=>$value) {
00061                 $this->addText(' '.$key.'="'.addslashes($value).'"');
00062             }
00063         } elseif (is_string($params)) {
00064             $this->addText(' '.$params);
00065         }
00066 
00067         $this->addText('>'.$this->getInnerText().'</a>'.$this->getAfterText().'</li>'."\r\n");
00068 
00069         return parent::_toHtml();
00070     }

setLink ( liParams,
aParams,
innerText,
afterText = '' 
)

Definition at line 35 of file Link.php.

00036     {
00037         $this->setLiParams($liParams);
00038         $this->setAParams($aParams);
00039         $this->setInnerText($innerText);
00040         $this->setAfterText($afterText);
00041 
00042         return $this;
00043     }


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

Generated on Sat Jul 4 17:23:54 2009 for Magento by  doxygen 1.5.8