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;
    }
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;
    }
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 ; }
Checks if a key is legitimate or should be added to
the field value collection
Checks if a key is legitimate or should be added to the field value collection