protected function getManualConfig(Model $model)
    {
        if (!method_exists($model, 'xTypeConfig')) {
            return [];
        }

        $config = $model->xTypeConfig();
        $parsed = [];
        $foreignKeys = [];

        foreach ($config as $key=>$rule) {
            if ($rule != 'relation') {
                $parsed[$key] = $rule;
                continue;
            }

            $relation = $this->relationReflector->buildRelationXTypeInfo($model, $key);

            $parsed[$key] = $relation['type'];

            if ($relation['foreign_keys']) {
                $foreignKeys += $relation['foreign_keys'];
            }
        }

        return $parsed;
    }
protected function getManualConfig(Model $model)
    {
        if (!method_exists($model, 'xTypeConfig')) {
            return [];
        }

        $config = $model->xTypeConfig();
        $parsed = [];
        $foreignKeys = [];

        foreach ($config as $key=>$rule) {
            if ($rule != 'relation') {
                $parsed[$key] = $rule;
                continue;
            }

            $relation = $this->relationReflector->buildRelationXTypeInfo($model, $key);

            $parsed[$key] = $relation['type'];

            if ($relation['foreign_keys']) {
                $foreignKeys += $relation['foreign_keys'];
            }
        }

        return $parsed;
    }
protected function getManualConfig ( Model $ model ) { if ( ! method_exists ( $ model , 'xTypeConfig' ) ) { return [ ] ; } $ config = $ model -> xTypeConfig ( ) ; $ parsed = [ ] ; $ foreignKeys = [ ] ; foreach ( $ config as $ key => $ rule ) { if ( $ rule != 'relation' ) { $ parsed [ $ key ] = $ rule ; continue ; } $ relation = $ this -> relationReflector -> buildRelationXTypeInfo ( $ model , $ key ) ; $ parsed [ $ key ] = $ relation [ 'type' ] ; if ( $ relation [ 'foreign_keys' ] ) { $ foreignKeys += $ relation [ 'foreign_keys' ] ; } } return $ parsed ; }
Return the manually setted config of Model or an empty array

@param Model $model

@return array
Return the manually setted config of Model or an empty array