<?php

use WpBookingEvent\Form\Form as FormAlias;

$block = $this->item->type;
$block = str_replace("-", "_", $block);
$tmpl_short_path = "/blocks/block_$block/$block.php";

FormAlias::addFormPath(WPBOOKINGEVENT_APP_FRONTEND_BLOCK_PATH . "/blocks/block_$block/forms");
$tmpl_path = WPBOOKINGEVENT_APP_FRONTEND_BLOCK_PATH . $tmpl_short_path;

if (file_exists($tmpl_path)) {
    include $tmpl_path;
}
?>