Service_Provider

Class Service_Provider


Source

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

class Service_Provider extends \tad_DI52_ServiceProvider {
	/**
	 * Registers the bindings and hooks the filters required for the ECP->TEC Customizer integration to work.
	 *
	 * @since 5.8.0
	 */
	public function register() {
		$this->container->singleton( 'pro.views.v2.customizer.provider', $this );

		$this->register_hooks();

		// Events Bar overrides and additions.
		tribe_register( Events_Bar::class, Events_Bar::class );
		// Global Elements overrides and additions.
		tribe_register( Global_Elements::class, Global_Elements::class );
	}

	/**
	 * Register the hooks for Tribe_Customizer integration.
	 *
	 * @since 5.8.0
	 */
	public function register_hooks() {
		$hooks = new Hooks( $this->container );
		$hooks->register();

		// Allow Hooks to be removed, by having the them registered to the container
		$this->container->singleton( Hooks::class, $hooks );
		$this->container->singleton( 'pro.views.v2.customizer.hooks', $hooks );
	}

}

Top ↑

Changelog

Changelog
Version Description
5.8.0 Introduced.

Top ↑

Methods

  • register — Registers the bindings and hooks the filters required for the ECP->TEC Customizer integration to work.
  • register_hooks — Register the hooks for Tribe_Customizer integration.