public function get_posts_sorter() : sorter_entity {
        return new sorter_entity(
            // Get id function for a post_entity.
            function(post_entity $post) {
                return $post->get_id();
            },
            // Get parent id function for a post_entity.
            function(post_entity $post) {
                return $post->get_parent_id();
            }
        );
    }