1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class ProfileMiniListItem extends ProfileListItem
- {
- function show()
- {
- $this->out->elementStart('li', 'h-card');
- if (Event::handle('StartProfileListItemProfileElements', array($this))) {
- if (Event::handle('StartProfileListItemAvatar', array($this))) {
- $aAttrs = $this->linkAttributes();
- $this->out->elementStart('a', $aAttrs);
- $avatarUrl = $this->profile->avatarUrl(AVATAR_MINI_SIZE);
- $this->out->element('img', array('src' => $avatarUrl,
- 'width' => AVATAR_MINI_SIZE,
- 'height' => AVATAR_MINI_SIZE,
- 'class' => 'avatar u-photo',
- 'alt' => $this->profile->getBestName()));
- $this->out->elementEnd('a');
- Event::handle('EndProfileListItemAvatar', array($this));
- }
- $this->out->elementEnd('li');
- }
- }
-
- function linkAttributes()
- {
- $aAttrs = parent::linkAttributes();
- $aAttrs['title'] = $this->profile->getBestName();
- $aAttrs['rel'] = 'contact member';
- $aAttrs['class'] = 'u-url p-name';
- return $aAttrs;
- }
- }
|