public function run()
    {
        $url = Yii::$app->request->getUrl();

        $out = '';
        switch ($this->what) {
            case 'forum':
                $out .= Yii::t('podium/view', 'Browsing this forum') . ': ';
                break;
            case 'topic':
                $out .= Yii::t('podium/view', 'Reading this thread') . ': ';
                break;
            case 'unread':
                $out .= Yii::t('podium/view', 'Browsing unread threads') . ': ';
                break;
            case 'members':
                $out .= Yii::t('podium/view', 'Browsing the members') . ': ';
                break;
        }

        $out .= $this->getNamedUsersList($url);

        $anonymous = $this->getAnonymousUsers($url);
        if ($anonymous) {
            $out .= Html::button(
                Yii::t('podium/view', '{n, plural, =1{# anonymous user} other{# anonymous users}}', [
                    'n' => $anonymous
                ]),
                ['class' => 'btn btn-xs btn-default disabled']
            ) . ' ';
        }
        $guests = $this->getGuestUsers($url);
        if ($guests) {
            $out .= Html::button(
                Yii::t('podium/view', '{n, plural, =1{# guest} other{# guests}}', [
                    'n' => $guests
                ]),
                ['class' => 'btn btn-xs btn-default disabled']
            );
        }

        return $out;
    }
public function run()
    {
        $url = Yii::$app->request->getUrl();

        $out = '';
        switch ($this->what) {
            case 'forum':
                $out .= Yii::t('podium/view', 'Browsing this forum') . ': ';
                break;
            case 'topic':
                $out .= Yii::t('podium/view', 'Reading this thread') . ': ';
                break;
            case 'unread':
                $out .= Yii::t('podium/view', 'Browsing unread threads') . ': ';
                break;
            case 'members':
                $out .= Yii::t('podium/view', 'Browsing the members') . ': ';
                break;
        }

        $out .= $this->getNamedUsersList($url);

        $anonymous = $this->getAnonymousUsers($url);
        if ($anonymous) {
            $out .= Html::button(
                Yii::t('podium/view', '{n, plural, =1{# anonymous user} other{# anonymous users}}', [
                    'n' => $anonymous
                ]),
                ['class' => 'btn btn-xs btn-default disabled']
            ) . ' ';
        }
        $guests = $this->getGuestUsers($url);
        if ($guests) {
            $out .= Html::button(
                Yii::t('podium/view', '{n, plural, =1{# guest} other{# guests}}', [
                    'n' => $guests
                ]),
                ['class' => 'btn btn-xs btn-default disabled']
            );
        }

        return $out;
    }
public function run ( ) { $ url = Yii :: $ app -> request -> getUrl ( ) ; $ out = '' ; switch ( $ this -> what ) { case 'forum' : $ out .= Yii :: t ( 'podium/view' , 'Browsing this forum' ) . ': ' ; break ; case 'topic' : $ out .= Yii :: t ( 'podium/view' , 'Reading this thread' ) . ': ' ; break ; case 'unread' : $ out .= Yii :: t ( 'podium/view' , 'Browsing unread threads' ) . ': ' ; break ; case 'members' : $ out .= Yii :: t ( 'podium/view' , 'Browsing the members' ) . ': ' ; break ; } $ out .= $ this -> getNamedUsersList ( $ url ) ; $ anonymous = $ this -> getAnonymousUsers ( $ url ) ; if ( $ anonymous ) { $ out .= Html :: button ( Yii :: t ( 'podium/view' , '{n, plural, =1{# anonymous user} other{# anonymous users}}' , [ 'n' => $ anonymous ] ) , [ 'class' => 'btn btn-xs btn-default disabled' ] ) . ' ' ; } $ guests = $ this -> getGuestUsers ( $ url ) ; if ( $ guests ) { $ out .= Html :: button ( Yii :: t ( 'podium/view' , '{n, plural, =1{# guest} other{# guests}}' , [ 'n' => $ guests ] ) , [ 'class' => 'btn btn-xs btn-default disabled' ] ) ; } return $ out ; }
Renders the list of users reading current section.
@return string
Renders the list of users reading current section .