Timber\Site::switch_to_blog PHP Метод

switch_to_blog() защищенный статический Метод

Switches to the blog requested in the request
protected static switch_to_blog ( string | integer | null $site_name_or_id ) : integer
$site_name_or_id string | integer | null
Результат integer with the ID of the new blog
    protected static function switch_to_blog($site_name_or_id)
    {
        if ($site_name_or_id === null) {
            $site_name_or_id = get_current_blog_id();
        }
        $info = get_blog_details($site_name_or_id);
        switch_to_blog($info->blog_id);
        return $info->blog_id;
    }