protected function getRelationshipMethod(ForeignRelationship $relation)
    {
        $stub = $this->getStubContent('model-relation');

        $this->replaceRelationName($stub, $relation->name)
            ->replaceRelationType($stub, $relation->getType())
            ->replaceRelationParams($stub, $this->turnRelationArgumentToString($relation->parameters));

        return $stub;
    }
protected function getRelationshipMethod(ForeignRelationship $relation)
    {
        $stub = $this->getStubContent('model-relation');

        $this->replaceRelationName($stub, $relation->name)
            ->replaceRelationType($stub, $relation->getType())
            ->replaceRelationParams($stub, $this->turnRelationArgumentToString($relation->parameters));

        return $stub;
    }
protected function getRelationshipMethod ( ForeignRelationship $ relation ) { $ stub = $ this -> getStubContent ( 'model-relation' ) ; $ this -> replaceRelationName ( $ stub , $ relation -> name ) -> replaceRelationType ( $ stub , $ relation -> getType ( ) ) -> replaceRelationParams ( $ stub , $ this -> turnRelationArgumentToString ( $ relation -> parameters ) ) ; return $ stub ; }
Creates the code for a relationship.

@param CrestApps\CodeGenerator\Models\ForeignRelation $relation

@return string
Creates the code for a relationship .