original_string: protected function renderForm($form, $view)
      {
          $errors = [];
          if(Yii::$app->request->isPost) {
              $form->load(Yii::$app->request->post());
              if(!$form->save()) {
                  $errors = $form->getErrors();
              }
  
              return $this->redirect('list');
          }
  
          $currentLanguage = [
              $form->languageId => $this->_languageProvider->getNameByID($form->languageId)
          ];
  
          return $this->render($view, [
              'model' => $form,
              'errors' => $errors,
              'currentLanguage' => $currentLanguage
          ]);
      }
code: protected function renderForm($form, $view)
      {
          $errors = [];
          if(Yii::$app->request->isPost) {
              $form->load(Yii::$app->request->post());
              if(!$form->save()) {
                  $errors = $form->getErrors();
              }
  
              return $this->redirect('list');
          }
  
          $currentLanguage = [
              $form->languageId => $this->_languageProvider->getNameByID($form->languageId)
          ];
  
          return $this->render($view, [
              'model' => $form,
              'errors' => $errors,
              'currentLanguage' => $currentLanguage
          ]);
      }
code_tokens: protected function renderForm ( $ form , $ view ) { $ errors = [ ] ; if ( Yii :: $ app -> request -> isPost ) { $ form -> load ( Yii :: $ app -> request -> post ( ) ) ; if ( ! $ form -> save ( ) ) { $ errors = $ form -> getErrors ( ) ; } return $ this -> redirect ( 'list' ) ; } $ currentLanguage = [ $ form -> languageId => $ this -> _languageProvider -> getNameByID ( $ form -> languageId ) ] ; return $ this -> render ( $ view , [ 'model' => $ form , 'errors' => $ errors , 'currentLanguage' => $ currentLanguage ] ) ; }
docstring: Method for rendering form for create and edit of template
  
  @param TemplateForm $form
  @param string $view
  @return string
docstring_tokens: Method for rendering form for create and edit of template