Controller::do_register()

Binds and sets up implementations.

Contents


Source

File: src/Tickets/Blocks/Controller.php

	public function do_register(): void {
		// The general warnings class.
		$this->container->singleton( 'tickets.editor.warnings', Warnings::class, [ 'hook' ] );

		// Register these all the time - as we now use them in most of the templates, blocks or otherwise.
		$this->container->singleton( 'tickets.editor.template.overwrite', Template_Overwrite::class );
		$this->container->singleton( 'tickets.editor.template', Template::class );
		$this->container->singleton( 'tickets.editor.blocks.tickets', Tickets_Block::class, [ 'load' ] );
		$this->container->singleton( 'tickets.editor.blocks.rsvp', RSVP_Block::class, [ 'load' ] );
		$this->container->singleton( 'tickets.editor.blocks.tickets-item', Ticket_Item_Block::class, [ 'load' ] );
		$this->container->singleton( 'tickets.editor.blocks.attendees', Attendees_Block::class, [ 'load' ] );
		$this->container->singleton( 'tickets.editor.configuration', Configuration::class, [ 'hook' ] );

		$this->register_for_blocks();

		// Handle general non-block-specific instances.
		tribe( 'tickets.editor.warnings' );
	}

Top ↑

Changelog

Changelog
Version Description
4.9 Introduced.