In fact, the value of $use_template_search is the value of the settings SearchViewHandling [1] which tells eZ publish to use the template code or a builtin function in PHP. If you need some special parameters (like class restriction) you need to set it to the value <b>template</b>.