original_string: 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'));
          }
      }
code: 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'));
          }
      }
code_tokens: 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' ) ) ; } }
docstring: Prints a simple Login Button which redirects to an authorization window from Nextcloud.
  
  @return mixed login window properties.
  @throws coding_exception
docstring_tokens: Prints a simple Login Button which redirects to an authorization window from Nextcloud .