You can use the pre_get_posts
filter to modify requested posts, this filter works in the admin area too, so you don’t need to go to the trouble of creating a new post list table class
First lets add a query var to the URL of your ‘My Cases’ page:
function register_adminMenu(){
add_submenu_page('edit.php?post_type=case&mycases=mine', 'My Cases', 'My Cases', 'manage_options', 'my_cases', 1);
}
Then, if that value is set, add the filter:
if ( !empty( $_GET['mycases'] ) ) {
add_filter( 'pre_get_posts', function( $query ) {
if ( is_main_query() && is_post_type_archive('case') && is_admin() ) {
$query->set( 'author', $your_user_id );
}
});
}
Remember to set the user ID!
But wait, you want to show just your cases, aka cases with a specific author? If that’s the case we don’t even need the filter!
function register_adminMenu(){
add_submenu_page('edit.php?post_type=case&author=". get_current_user_id(), "My Cases', 'My Cases', 'manage_options', 'my_cases', 1);
}