<?php
namespace WpBookingHotelFrontend\app\views\hotel;
use WpBookingHotel\Mvc\Model\Model;
use WpBookingHotel\Mvc\View\View;
use WpBookingHotel\Factory as FactoryAlias;

class HotelView extends View
{
    public function display($tpl){
        $input = FactoryAlias::getInput();
        $hotel_id = $input->getInt('hotel_id',0);
        $modelHotel = Model::getInstance('hotel');
        $modelReview = Model::getInstance('review');
        $this->item = $modelHotel->getItem($hotel_id);
        $this->form = $modelHotel->getForm();
        $this->form_review = $modelReview->getForm();

        return parent::display($tpl);
    }
}