File tree Expand file tree Collapse file tree 1 file changed +43
-3
lines changed
app/code/core/Mage/Page/Block/Template/Links Expand file tree Collapse file tree 1 file changed +43
-3
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments