fitness-web/frontend/components/ReceptionWidget.php

36 lines
616 B
PHP

<?php
namespace frontend\components;
use yii\base\Widget;
class ReceptionWidget extends Widget{
public $form;
public $number;
public $route;
public $customer;
public $card;
public $tickets;
public $viewFile = '//common/_reception';
public function init(){
parent::init();
if ( isset($this->form)){
$this->card = $this->form->card;
$this->customer = $this->form->customer;
$this->tickets = $this->form->tickets;
}
}
public function run(){
echo $this->render($this->viewFile,['card' => $this->card, 'customer' =>$this->customer, 'tickets' => $this->tickets ]);
}
}