summaryrefslogtreecommitdiff
path: root/plugins/Group_assign/Helper/SmallAvatarHelperExtend.php
blob: 1ee35c983e4d3e4d077ba72dbba9682cc07fded2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

namespace Kanboard\Plugin\Group_assign\Helper;

use Kanboard\Helper\AvatarHelper;
use Kanboard\Core\Base;
/**
 * Avatar Helper
 *
 * @package helper
 * @author  Frederic Guillot
 */
class SmallAvatarHelperExtend extends AvatarHelper
{

    public function smallMultiple($owner_ms, $css = '') {
        $assignees = $this->multiselectMemberModel->getMembers($owner_ms);
        $html = "";
        foreach ($assignees as $assignee) {
            $user = $this->userModel->getById($assignee['user_id']);
            $html .= $this->render($assignee['user_id'], $user['username'], $user['name'], $user['email'], $user['avatar_path'], $css, 20);
        }
        return $html;
    }    
    
    public function miniMultiple($owner_ms, $css = '') {
        $assignees = $this->multiselectMemberModel->getMembers($owner_ms);
        $html = "";
        foreach ($assignees as $assignee) {
            $user = $this->userModel->getById($assignee['user_id']);
            $html .= $this->render($assignee['user_id'], $user['username'], $user['name'], $user['email'], $user['avatar_path'], $css, 13);
        }
        return $html;
    }
 }