original_string: public function SearchForm() {
          $languages=SnippetLanguage::get()
                                          ->leftJoin('Snippet', '"Snippet"."LanguageID"="SnippetLanguage"."ID"')
                                          ->where('"SnippetLanguage"."Hidden"=0 OR "Snippet"."ID" IS NOT NULL')
                                          ->sort('Name');
          
          $fields=new FieldList(
                              new TextField('q[Term]', _t('CodeBank.KEYWORD', '_Keyword')),
                              $classDropdown=new DropdownField(
                                                              'q[LanguageID]',
                                                              _t('CodeBank.LANGUAGE', '_Language'),
                                                              $languages->map('ID', 'Name')
                                                          )
                          );
          
          
          $classDropdown->setEmptyString(_t('CodeBank.ALL_LANGUAGES', '_All Languages'));
          
          
          $actions=new FieldList(
                              FormAction::create('doSearch', _t('CodeBank.APPLY_FILTER', '_Apply Filter'))->setUseButtonTag(true)
                          );
          
          
          $form=Form::create($this, 'SearchForm', $fields, $actions)
                                                                  ->addExtraClass('cms-search-form')
                                                                  ->setFormMethod('GET')
                                                                  ->setFormAction($this->Link())
                                                                  ->disableSecurityToken()
                                                                  ->unsetValidator();
          $form->loadDataFrom($this->request->getVars());
      
          $this->extend('updateSearchForm', $form);
          return $form;
      }
code: public function SearchForm() {
          $languages=SnippetLanguage::get()
                                          ->leftJoin('Snippet', '"Snippet"."LanguageID"="SnippetLanguage"."ID"')
                                          ->where('"SnippetLanguage"."Hidden"=0 OR "Snippet"."ID" IS NOT NULL')
                                          ->sort('Name');
          
          $fields=new FieldList(
                              new TextField('q[Term]', _t('CodeBank.KEYWORD', '_Keyword')),
                              $classDropdown=new DropdownField(
                                                              'q[LanguageID]',
                                                              _t('CodeBank.LANGUAGE', '_Language'),
                                                              $languages->map('ID', 'Name')
                                                          )
                          );
          
          
          $classDropdown->setEmptyString(_t('CodeBank.ALL_LANGUAGES', '_All Languages'));
          
          
          $actions=new FieldList(
                              FormAction::create('doSearch', _t('CodeBank.APPLY_FILTER', '_Apply Filter'))->setUseButtonTag(true)
                          );
          
          
          $form=Form::create($this, 'SearchForm', $fields, $actions)
                                                                  ->addExtraClass('cms-search-form')
                                                                  ->setFormMethod('GET')
                                                                  ->setFormAction($this->Link())
                                                                  ->disableSecurityToken()
                                                                  ->unsetValidator();
          $form->loadDataFrom($this->request->getVars());
      
          $this->extend('updateSearchForm', $form);
          return $form;
      }
code_tokens: public function SearchForm ( ) { $ languages = SnippetLanguage :: get ( ) -> leftJoin ( 'Snippet' , '"Snippet"."LanguageID"="SnippetLanguage"."ID"' ) -> where ( '"SnippetLanguage"."Hidden"=0 OR "Snippet"."ID" IS NOT NULL' ) -> sort ( 'Name' ) ; $ fields = new FieldList ( new TextField ( 'q[Term]' , _t ( 'CodeBank.KEYWORD' , '_Keyword' ) ) , $ classDropdown = new DropdownField ( 'q[LanguageID]' , _t ( 'CodeBank.LANGUAGE' , '_Language' ) , $ languages -> map ( 'ID' , 'Name' ) ) ) ; $ classDropdown -> setEmptyString ( _t ( 'CodeBank.ALL_LANGUAGES' , '_All Languages' ) ) ; $ actions = new FieldList ( FormAction :: create ( 'doSearch' , _t ( 'CodeBank.APPLY_FILTER' , '_Apply Filter' ) ) -> setUseButtonTag ( true ) ) ; $ form = Form :: create ( $ this , 'SearchForm' , $ fields , $ actions ) -> addExtraClass ( 'cms-search-form' ) -> setFormMethod ( 'GET' ) -> setFormAction ( $ this -> Link ( ) ) -> disableSecurityToken ( ) -> unsetValidator ( ) ; $ form -> loadDataFrom ( $ this -> request -> getVars ( ) ) ; $ this -> extend ( 'updateSearchForm' , $ form ) ; return $ form ; }
docstring: Generates the search form
  @return {Form} Form used for searching
docstring_tokens: Generates the search form