Block::render( array $attributes = array() )

Since we are dealing with a Dynamic type of Block we need a PHP method to render it


Parameters

$attributes

(array) (Optional)

Default value: array()


Top ↑

Return

(string)


Top ↑

Source

File: src/Tickets/Blocks/Tickets/Block.php

	public function render( $attributes = [] ) {
		/** @var Template $template */
		$template     = tribe( 'tickets.editor.template' );
		$post_id      = $template->get( 'post_id', null, false );
		$tickets_view = Tickets_View::instance();

		return $tickets_view->get_tickets_block( $post_id, false );
	}

Top ↑

Changelog

Changelog
Version Description
4.9 Introduced.