diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-14 14:52:26 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-14 14:52:26 -0700 |
commit | c2dae24701a22cd2362ebe1a96828cd7945c6b5a (patch) | |
tree | f42f7a9961b131c3311800544ef113cb3c6e220a /lib/profileminilist.php | |
parent | 9addfeacfdacf1eb8c6a90a636f468e4aeb0e9fe (diff) |
Break profilelist into a recipe
Expanded the ProfileList class so it worked more like a recipe. This
helps to get rid of a lot of special cases and simplifies the code. It
also makes it possible to do things like group block.
Diffstat (limited to 'lib/profileminilist.php')
-rw-r--r-- | lib/profileminilist.php | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/lib/profileminilist.php b/lib/profileminilist.php index 57496d0e9..f11cae8a5 100644 --- a/lib/profileminilist.php +++ b/lib/profileminilist.php @@ -47,26 +47,15 @@ define('PROFILES_PER_MINILIST', 27); class ProfileMiniList extends ProfileList { - function show() + function newListItem($profile) { - $this->out->elementStart('ul', 'entities users xoxo'); - - $cnt = 0; - - while ($this->profile->fetch()) { - $cnt++; - if($cnt > PROFILES_PER_MINILIST) { - break; - } - $this->showProfile(); - } - - $this->out->elementEnd('ul'); - - return $cnt; + return new ProfileMiniListItem($profile, $this->action); } +} - function showProfile() +class ProfileMiniListItem extends ProfileListItem +{ + function show() { $this->out->elementStart('li', 'vcard'); $this->out->elementStart('a', array('title' => $this->profile->getBestName(), |