• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/googlehandler.php
  • Класс: BitrixDiskDocumentGoogleHandler
  • Вызов: GoogleHandler::getUrlForAuthorizeInTokenService
public function getUrlForAuthorizeInTokenService($mode = 'modal')
{
	if(!Loader::includeModule('socialservices'))
	{
		$this->errorCollection[] = new Error(
			Loc::getMessage('DISK_GOOGLE_HANDLER_ERROR_NOT_INSTALLED_SOCSERV'), self::ERROR_NOT_INSTALLED_SOCSERV
		);
		return false;
	}

	$socGoogleOAuth = new CSocServGoogleOAuth($this->userId);
	if($mode === 'opener')
	{
		return $socGoogleOAuth->getUrl(
			'opener',
			$this->getScopes(),
			array('BACKURL' => '#external-auth-ok')
		);
	}

	return $socGoogleOAuth->getUrl('modal', $this->getScopes());
}