Hooks::add_period_repository( array $repository_map, $repository, $args = array() )
Adds the period repository to the map of available repositories.
Contents
Parameters
- $repository_map
-
(array) (Required) The current repository map.
Return
(array) The filtered repository map.
Source
File: src/Tribe/Views/V2/Hooks.php
public function add_period_repository( array $repository_map, $repository, array $args = [] ) {
if ( 'period' === $repository ) {
// This is a new instance on each run, by design. Making this a singleton would create dangerous dependencies.
$event_period_repository = $this->container->make( Event_Period::class );
$event_period_repository->cache_results = in_array( 'caching', $args, true );
$repository_map['period'] = $event_period_repository;
}
return $repository_map;
}
Changelog
| Version | Description |
|---|---|
| 4.9.13 | Introduced. |