Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing variables and functions added #6

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions app/code/core/Mage/Page/Block/Template/Links/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ class Mage_Page_Block_Template_Links_Block extends Mage_Core_Block_Template
*
* @var string
*/
protected $_liPparams = null;
protected $_liParams = null;

/**
* A elemnt params
*
* @var string
*/
protected $_aPparams = null;
protected $_aParams = null;

/**
* Message before link text
Expand Down Expand Up @@ -197,5 +197,44 @@ public function getLinkUrl()
{
return $this->_url;
}
/**
* Prepare tag attributes
*
* @param string|array $params
* @return string
*/
protected function _prepareParams($params)
{
if (is_string($params)) {
return $params;
} elseif (is_array($params)) {
$result = '';
foreach ($params as $key=>$value) {
$result .= ' ' . $key . '="' . addslashes($value) . '"';
}
return $result;
}
return '';
}

/**
* Return Li Params
*
* @return string
*/
public function getLiParams()
{
return $this->_prepareParams($this->_liParams);
}

/**
* Return Link Tag Params
*
* @return string
*/
public function getAParams()
{
return $this->_prepareParams($this->_aParams);
}

}