We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Get cover in group's plugin | Forum

Thomas
Thomas Jul 21 '16
Hi,

How can I get the cover of my group in groups_widget.php pls ? Any ideas ?


private function assignList( $listName, $list )
    {
        $groupIdList = array();

        foreach ( $list as $item )
        {
            $groupIdList[] = $item->id;
        }

        $userCountList = $this->service->findUserCountForList($groupIdList);

        $tplList = array();
        foreach ( $list as $item )
        {
            /* @var $item GROUPS_BOL_Group */
            /* I need the cover of my group here */
            $tplList[] = array(
                'image' => $this->service->getGroupImageUrl($item),
                'description' => $item->description,
                'title' => htmlspecialchars($item->title),
                'url' => OW::getRouter()->urlForRoute('groups-view', array('groupId' => $item->id)),
                'users' => $userCountList[$item->id]
            );
        }

        $this->assign($listName, $tplList);

        return!empty($tplList);
    }