protected function getRelationsConfigReplace()
    {
        $relationships = $this->collectRelationshipDataForConfig();

        if ( ! count($relationships)) return '';


        $replace = $this->tab() . "protected \$relationsConfig = [\n";

        foreach ($relationships as $name => $relationship) {

            $replace .= $this->tab(2) . "'" . $name . "' => [\n";

            $rows = [];

            if (array_get($relationship, 'field')) {
                $rows['field'] = $relationship['field'];
            }

            if (array_get($relationship, 'special')) {
                $rows['type'] = $relationship['specialString'];
            } else {
                $rows['parent'] = ($relationship['reverse'] ? 'false' : 'true');
            }

            if (array_get($relationship, 'translated') === true) {
                $rows['translated'] = 'true';
            }

            $longestPropertyLength = $this->getLongestKey($rows);

            foreach ($rows as $property => $value) {

                $replace .= $this->tab(3) . "'"
                    . str_pad($property . "'", $longestPropertyLength + 1)
                    . " => {$value},\n";
            }


            $replace .= $this->tab(2) . "],\n";
        }

        $replace .= $this->tab() . "];\n\n";

        return $replace;
    }