src/Node.php
public function transformInto($id)
    {
        $newType = NodeType::find($id);

        if (is_null($newType))
        {
            throw new \RuntimeException('Node type does not exist');
        }

        $sourceAttributes = $this->parseSourceAttributes();

        $this->flushSources();

        $this->transformNodeType($newType);

        $this->remakeSources($newType);

        $this->fill($sourceAttributes);

        $this->save();
    }
public function transformInto($id)
    {
        $newType = NodeType::find($id);

        if (is_null($newType))
        {
            throw new \RuntimeException('Node type does not exist');
        }

        $sourceAttributes = $this->parseSourceAttributes();

        $this->flushSources();

        $this->transformNodeType($newType);

        $this->remakeSources($newType);

        $this->fill($sourceAttributes);

        $this->save();
    }
public function transformInto ( $ id ) { $ newType = NodeType :: find ( $ id ) ; if ( is_null ( $ newType ) ) { throw new \ RuntimeException ( 'Node type does not exist' ) ; } $ sourceAttributes = $ this -> parseSourceAttributes ( ) ; $ this -> flushSources ( ) ; $ this -> transformNodeType ( $ newType ) ; $ this -> remakeSources ( $ newType ) ; $ this -> fill ( $ sourceAttributes ) ; $ this -> save ( ) ; }
Transforms the node type with to given type

@param int $id
@throws \RuntimeException
Transforms the node type with to given type