Service_Provider::register()

Registers the bindings required for the plugin integration with Views v2 to work.


Source #

File: src/Tribe/Views/V2/Service_Provider.php

	public function register() {
		if ( ! (
			function_exists( 'tribe_events_views_v2_is_enabled' )
			&& tribe_events_views_v2_is_enabled()
		) ) {
			// If The Events Calendar is not active or Views v2 is not enabled, bail.
			return;
		}

		// Register this Service Provider on the container.
		$this->container->singleton( 'community.views.v2.provider', $this );
		$this->container->singleton( static::class, $this );

		$this->register_hooks();
	}

Top ↑

Changelog #

Changelog
Version Description
4.8.3 Introduced.