Block::render( array $attributes = array() )
Since we are dealing with a Dynamic type of Block we need a PHP method to render it
Contents
Parameters
- $attributes
-
(array) (Optional)
Default value: array()
Return
(string)
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 );
}
Changelog
| Version | Description |
|---|---|
| 4.9 | Introduced. |