public function print_login() {
        $client = $this->get_user_oauth_client();
        $loginurl = $client->get_login_url();
        if ($this->options['ajax']) {
            $ret = array();
            $btn = new \stdClass();
            $btn->type = 'popup';
            $btn->url = $loginurl->out(false);
            $ret['login'] = array($btn);
            return $ret;
        } else {
            echo html_writer::link($loginurl, get_string('login', 'repository'),
                    array('target' => '_blank',  'rel' => 'noopener noreferrer'));
        }
    }
public function print_login() {
        $client = $this->get_user_oauth_client();
        $loginurl = $client->get_login_url();
        if ($this->options['ajax']) {
            $ret = array();
            $btn = new \stdClass();
            $btn->type = 'popup';
            $btn->url = $loginurl->out(false);
            $ret['login'] = array($btn);
            return $ret;
        } else {
            echo html_writer::link($loginurl, get_string('login', 'repository'),
                    array('target' => '_blank',  'rel' => 'noopener noreferrer'));
        }
    }
public function print_login ( ) { $ client = $ this -> get_user_oauth_client ( ) ; $ loginurl = $ client -> get_login_url ( ) ; if ( $ this -> options [ 'ajax' ] ) { $ ret = array ( ) ; $ btn = new \ stdClass ( ) ; $ btn -> type = 'popup' ; $ btn -> url = $ loginurl -> out ( false ) ; $ ret [ 'login' ] = array ( $ btn ) ; return $ ret ; } else { echo html_writer :: link ( $ loginurl , get_string ( 'login' , 'repository' ) , array ( 'target' => '_blank' , 'rel' => 'noopener noreferrer' ) ) ; } }
Prints a simple Login Button which redirects to an authorization window from Nextcloud.

@return mixed login window properties.
@throws coding_exception
Prints a simple Login Button which redirects to an authorization window from Nextcloud .