8 – How to get the ViewsBlock View object?

I load a variable list of blocks. In some cases, these blocks are of the type views_block. When I load a view_block, the viewsblockbase provides the protected view object, but does not provide a method to retrieve it.

How could I get the full view object from a view_block?

I've envisioned a ViewsBlock :: Create () approach but that would be redundant, which I try to avoid. Likewise, I have the properties view_id and display_id, but I would not prefer Views :: GetView () when the object is already sitting in the loaded block.

fragment

getBlocks ();
foreach ($ blocks as $ region => $ region_blocks) {
foreach ($ region_blocks as $ index => $ block_id) {

// $ block_id example views_block: dashboard_tasks_by_assignee-block_1

$ load_block = $ block_instance-> createInstance ($ block_id);

$ title = $ load_block-> label ();
$ build_block = $ load_block-> build ();
$ build_block['#block_title'] = $ title;

// check the type of plugin
$ definition = $ load_block-> getPluginDefinition ();

if ($ definition['id'] == & # 39; views_block & # 39;) {
// I can not do that
$ view = $ load_block-> view;
}
}