public function run()
    {
        if (!$this->model) {
            return null;
        }
        $hidden = $this->model->hidden;
        if ($hidden && !empty($this->model->end_at) && $this->model->end_at < time()) {
            $hidden = 0;
        }
        return $this->render('view', [
            'model' => $this->model,
            'hidden' => $hidden,
            'voted' => $this->display ? true : $this->model->getUserVoted(User::loggedId()),
            'display' => $this->display
        ]);
    }
public function run()
    {
        if (!$this->model) {
            return null;
        }
        $hidden = $this->model->hidden;
        if ($hidden && !empty($this->model->end_at) && $this->model->end_at < time()) {
            $hidden = 0;
        }
        return $this->render('view', [
            'model' => $this->model,
            'hidden' => $hidden,
            'voted' => $this->display ? true : $this->model->getUserVoted(User::loggedId()),
            'display' => $this->display
        ]);
    }
public function run ( ) { if ( ! $ this -> model ) { return null ; } $ hidden = $ this -> model -> hidden ; if ( $ hidden && ! empty ( $ this -> model -> end_at ) && $ this -> model -> end_at < time ( ) ) { $ hidden = 0 ; } return $ this -> render ( 'view' , [ 'model' => $ this -> model , 'hidden' => $ hidden , 'voted' => $ this -> display ? true : $ this -> model -> getUserVoted ( User :: loggedId ( ) ) , 'display' => $ this -> display ] ) ; }
Rendering the poll.
@return string
Rendering the poll .