original_string: public function getCurrentTopOrganizationId()
      {
          $userLoader = $this->loader->getUserLoader();
  
          // Url determines organization first.
          if ($orgId = $userLoader->getOrganizationIdByUrl()) {
              $this->_organizationFromUrl = true;
              return ' ';
          }
  
          $request = $this->getRequest();
          if ($request->isPost() && ($orgId = $request->getParam($this->topOrganizationFieldName))) {
              \Gems_Cookies::set('gems_toporganization', $orgId);
              return $orgId;
          } else {
              $orgs = array_keys($this->getTopOrganizations());
              $firstId = reset($orgs);
              return \Gems_Cookies::get($this->getRequest(), 'gems_toporganization', $firstId);
          }
      }
code: public function getCurrentTopOrganizationId()
      {
          $userLoader = $this->loader->getUserLoader();
  
          // Url determines organization first.
          if ($orgId = $userLoader->getOrganizationIdByUrl()) {
              $this->_organizationFromUrl = true;
              return ' ';
          }
  
          $request = $this->getRequest();
          if ($request->isPost() && ($orgId = $request->getParam($this->topOrganizationFieldName))) {
              \Gems_Cookies::set('gems_toporganization', $orgId);
              return $orgId;
          } else {
              $orgs = array_keys($this->getTopOrganizations());
              $firstId = reset($orgs);
              return \Gems_Cookies::get($this->getRequest(), 'gems_toporganization', $firstId);
          }
      }
code_tokens: public function getCurrentTopOrganizationId ( ) { $ userLoader = $ this -> loader -> getUserLoader ( ) ; // Url determines organization first. if ( $ orgId = $ userLoader -> getOrganizationIdByUrl ( ) ) { $ this -> _organizationFromUrl = true ; return ' ' ; } $ request = $ this -> getRequest ( ) ; if ( $ request -> isPost ( ) && ( $ orgId = $ request -> getParam ( $ this -> topOrganizationFieldName ) ) ) { \ Gems_Cookies :: set ( 'gems_toporganization' , $ orgId ) ; return $ orgId ; } else { $ orgs = array_keys ( $ this -> getTopOrganizations ( ) ) ; $ firstId = reset ( $ orgs ) ; return \ Gems_Cookies :: get ( $ this -> getRequest ( ) , 'gems_toporganization' , $ firstId ) ; } }
docstring: Returns the top organization id that should currently be used for this form.
  
  @return int Returns the current organization id, if any
docstring_tokens: Returns the top organization id that should currently be used for this form .