public function getDataModel()
    {
        $dataModel = array();
        $model     = $this->config->getDataModel();

        foreach ($this->getEditFieldsArrays() as $name => $options) {
            //if this is a key, set it to 0
            if ($options['type'] === 'key') {
                $dataModel[$name] = 0;
            } else {
                //if this is a collection, convert it to an array
                if (is_a($model->$name, 'Illuminate\Database\Eloquent\Collection')) {
                    $dataModel[$name] = $model->$name->toArray();
                } else {
                    $dataModel[$name] = isset($options['value']) ? $options['value'] : null;
                }
            }
        }

        return $dataModel;
    }