original_string: public function setTemplateByCode($templateCode)
      {
          $select = $this->loader->getModels()->getCommTemplateModel()->getSelect();
          $select->where('gct_code = ?', $templateCode);
  
          $template = $this->db->fetchRow($select);
          if ($template) {
              $this->setTemplate($template['gct_id_template']);
              return true;
          } else {
              return false;
          }
      }
code: public function setTemplateByCode($templateCode)
      {
          $select = $this->loader->getModels()->getCommTemplateModel()->getSelect();
          $select->where('gct_code = ?', $templateCode);
  
          $template = $this->db->fetchRow($select);
          if ($template) {
              $this->setTemplate($template['gct_id_template']);
              return true;
          } else {
              return false;
          }
      }
code_tokens: public function setTemplateByCode ( $ templateCode ) { $ select = $ this -> loader -> getModels ( ) -> getCommTemplateModel ( ) -> getSelect ( ) ; $ select -> where ( 'gct_code = ?' , $ templateCode ) ; $ template = $ this -> db -> fetchRow ( $ select ) ; if ( $ template ) { $ this -> setTemplate ( $ template [ 'gct_id_template' ] ) ; return true ; } else { return false ; } }
docstring: Use the Mail template code to select and set the template
  @param string mail
docstring_tokens: Use the Mail template code to select and set the template