Template::__construct( TribeEventsViewsV2View_Interface $view )
Template constructor.
Contents
Parameters
- $view
-
(TribeEventsViewsV2View_Interface) (Required) The view the template should use to build its path.
Source
File: src/Tribe/Views/V2/Template.php
public function __construct( $slug ) {
$this->slug = $slug;
// Set some global defaults all Views are likely to search for; those will be overridden by each View.
$this->set_values( [
'slug' => $slug,
'prev_url' => '',
'next_url' => '',
], false );
$this->set_template_origin( tribe( 'tec.main' ) )
->set_template_folder( 'src/views/v2' )
->set_template_folder_lookup( true )
->set_template_context_extract( true );
}
Changelog
| Version | Description |
|---|---|
| 4.9.4 | Modified the first param to only accept View_Interface instances. |
| 4.9.2 | Introduced. |