Protected $view values inside template_views_pre_render function? I'm trying to alter the view page title by using the template_views_pre_render function inside mytemplate.theme file.
It works fine, I'm able to modify its title this way:

$view-&gt;build_info['title'] = ...


My issue now is that I need to restrict this action to only one specific view, so I simply need to check the view id.
I tried with if ($view-&gt;id == 'my_view_id') {...} but I realized I can't access the $view values because they are protected.
How can I implement this control here?
To access the value of the view object you can use the method get():

$view-&gt;get('id')


Or if the object provides a special method for the id, which is the case with the view object:

$view-&gt;id()