fitness-web/frontend/components/ReceptionCustomerWidget.php

29 lines
667 B
PHP

<?php
namespace frontend\components;
use common\models\MobileDevice;
use yii\base\Widget;
/**
* This is the model class for table "customer".
*
* @property string $viewFile
* @property common\models\ReceptionForm $model
* */
class ReceptionCustomerWidget extends Widget{
public $viewFile = '//common/_reception_customer';
public $model;
public function run(){
$showLinkDevices = MobileDevice::find()
->andWhere(['status' => MobileDevice::STATUS_INACTIVE])
->count() > 0;
echo $this->render($this->viewFile,[ 'model' => $this->model,
'showLinkDevices' => $showLinkDevices
]);
}
}