[core] make sortLinks method public