original_string: public function getDataTableOptions($field, $data)
      {
          $methodName = 'get'.studly_case($this->fieldName).'DataTableOptions';
  
          if (!$this->model->methodExists($methodName) && !$this->model->methodExists('getDataTableOptions')) {
              throw new ApplicationException(Lang::get('backend::lang.model.missing_method', ['class' => get_class($this->model), 'method' => 'getDataTableOptions']));
          }
  
          if ($this->model->methodExists($methodName)) {
              $result = $this->model->$methodName($field, $data);
          }
          else {
              $result = $this->model->getDataTableOptions($this->fieldName, $field, $data);
          }
  
          if (!is_array($result)) {
              $result = [];
          }
  
          return $result;
      }
code: public function getDataTableOptions($field, $data)
      {
          $methodName = 'get'.studly_case($this->fieldName).'DataTableOptions';
  
          if (!$this->model->methodExists($methodName) && !$this->model->methodExists('getDataTableOptions')) {
              throw new ApplicationException(Lang::get('backend::lang.model.missing_method', ['class' => get_class($this->model), 'method' => 'getDataTableOptions']));
          }
  
          if ($this->model->methodExists($methodName)) {
              $result = $this->model->$methodName($field, $data);
          }
          else {
              $result = $this->model->getDataTableOptions($this->fieldName, $field, $data);
          }
  
          if (!is_array($result)) {
              $result = [];
          }
  
          return $result;
      }
code_tokens: public function getDataTableOptions ( $ field , $ data ) { $ methodName = 'get' . studly_case ( $ this -> fieldName ) . 'DataTableOptions' ; if ( ! $ this -> model -> methodExists ( $ methodName ) && ! $ this -> model -> methodExists ( 'getDataTableOptions' ) ) { throw new ApplicationException ( Lang :: get ( 'backend::lang.model.missing_method' , [ 'class' => get_class ( $ this -> model ) , 'method' => 'getDataTableOptions' ] ) ) ; } if ( $ this -> model -> methodExists ( $ methodName ) ) { $ result = $ this -> model -> $ methodName ( $ field , $ data ) ; } else { $ result = $ this -> model -> getDataTableOptions ( $ this -> fieldName , $ field , $ data ) ; } if ( ! is_array ( $ result ) ) { $ result = [ ] ; } return $ result ; }
docstring: Looks at the model for getXXXDataTableOptions or getDataTableOptions methods
  to obtain values for autocomplete field types.
  @param  string $field Table field name
  @param  string $data  Data for the entire table
  @return array
docstring_tokens: Looks at the model for getXXXDataTableOptions or getDataTableOptions methods to obtain values for autocomplete field types .