Hooks::add_period_repository( array $repository_map,  $repository,  $args = array() )

Adds the period repository to the map of available repositories.


Parameters

$repository_map

(array) (Required) The current repository map.


Top ↑

Return

(array) The filtered repository map.


Top ↑

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;
	}

Top ↑

Changelog

Changelog
Version Description
4.9.13 Introduced.