add linkAttributes() method for profilelist

This commit is contained in:
Evan Prodromou 2010-04-05 10:46:26 -04:00
parent a313aeab9c
commit 19401f6530

View File

@ -181,9 +181,8 @@ class ProfileListItem extends Widget
function showAvatar()
{
$avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
$this->out->elementStart('a', array('href' => $this->profile->profileurl,
'class' => 'url entry-title',
'rel' => 'contact'));
$aAttrs = $this->linkAttributes();
$this->out->elementStart('a', $aAttrs);
$this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE),
'class' => 'photo avatar',
'width' => AVATAR_STREAM_SIZE,
@ -299,4 +298,11 @@ class ProfileListItem extends Widget
{
return htmlspecialchars($text);
}
function linkAttributes()
{
return array('href' => $this->profile->profileurl,
'class' => 'url entry-title',
'rel' => 'contact');
}
}