original_string: protected function isKeyAllowed($key)
      {
          /*
           * Let the core columns through
           */
          if ($key == 'id' || $key == 'value' || $key == 'item') {
              return true;
          }
  
          /*
           * Let relations through
           */
          if ($this->model->hasRelation($key)) {
              return true;
          }
  
          return false;
      }
code: protected function isKeyAllowed($key)
      {
          /*
           * Let the core columns through
           */
          if ($key == 'id' || $key == 'value' || $key == 'item') {
              return true;
          }
  
          /*
           * Let relations through
           */
          if ($this->model->hasRelation($key)) {
              return true;
          }
  
          return false;
      }
code_tokens: protected function isKeyAllowed ( $ key ) { /*
           * Let the core columns through
           */ if ( $ key == 'id' || $ key == 'value' || $ key == 'item' ) { return true ; } /*
           * Let relations through
           */ if ( $ this -> model -> hasRelation ( $ key ) ) { return true ; } return false ; }
docstring: Checks if a key is legitimate or should be added to
  the field value collection
docstring_tokens: Checks if a key is legitimate or should be added to the field value collection