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();
            }
        );
    }
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();
            }
        );
    }
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 ( ) ; } ) ; }
Create a sorter entity to sort post entities.

@return sorter_entity
Create a sorter entity to sort post entities .