original_string: public function setTemplate($template, $field = null)
      {
          if ($field === null) {
              $field = $this->last_column;
          }
  
          /** @type GiTemplate $gi */
          $gi = $this->add('GiTemplate');
          $this->columns[$field]['template'] = $gi->loadTemplateFromString($template);
  
          return $this;
      }
code: public function setTemplate($template, $field = null)
      {
          if ($field === null) {
              $field = $this->last_column;
          }
  
          /** @type GiTemplate $gi */
          $gi = $this->add('GiTemplate');
          $this->columns[$field]['template'] = $gi->loadTemplateFromString($template);
  
          return $this;
      }
code_tokens: public function setTemplate ( $ template , $ field = null ) { if ( $ field === null ) { $ field = $ this -> last_column ; } /** @type GiTemplate $gi */ $ gi = $ this -> add ( 'GiTemplate' ) ; $ this -> columns [ $ field ] [ 'template' ] = $ gi -> loadTemplateFromString ( $ template ) ; return $ this ; }
docstring: This allows you to use Template.
  
  @param string $template template as a string
  
  @return $this
docstring_tokens: This allows you to use Template .