Skip to content

Commit fe40916

Browse files
committed
Merge pull request #14 from syamvilakudy/patch-1
Missing variables and functions added
2 parents e2b8244 + 6e38ce6 commit fe40916

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

app/code/core/Mage/Page/Block/Template/Links/Block.php

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ class Mage_Page_Block_Template_Links_Block extends Mage_Core_Block_Template
7575
*
7676
* @var string
7777
*/
78-
protected $_liPparams = null;
78+
protected $_liParams = null;
7979

8080
/**
8181
* A elemnt params
8282
*
8383
* @var string
8484
*/
85-
protected $_aPparams = null;
85+
protected $_aParams = null;
8686

8787
/**
8888
* Message before link text
@@ -197,5 +197,45 @@ public function getLinkUrl()
197197
{
198198
return $this->_url;
199199
}
200-
200+
201+
/**
202+
* Prepare tag attributes
203+
*
204+
* @param string|array $params
205+
* @return string
206+
*/
207+
protected function _prepareParams($params)
208+
{
209+
if (is_string($params)) {
210+
return $params;
211+
} elseif (is_array($params)) {
212+
$result = '';
213+
foreach ($params as $key=>$value) {
214+
$result .= ' ' . $key . '="' . addslashes($value) . '"';
215+
}
216+
return $result;
217+
}
218+
return '';
219+
}
220+
221+
/**
222+
* Return Li Params
223+
*
224+
* @return string
225+
*/
226+
public function getLiParams()
227+
{
228+
return $this->_prepareParams($this->_liParams);
229+
}
230+
231+
/**
232+
* Return Link Tag Params
233+
*
234+
* @return string
235+
*/
236+
public function getAParams()
237+
{
238+
return $this->_prepareParams($this->_aParams);
239+
}
240+
201241
}

0 commit comments

Comments
 (0)