Esempio n. 1
0
                        </li>
                        <li><a href="#" data-set-lang="es">Spanish</a>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- END Language list    -->
            <h1><?php 
echo Yii::t('app', 'Hosts Registation process');
?>
</h1>
            <small data-localize="dashboard.WELCOME"></small>
        </div>
        <?php 
$userId = \Yii::$app->user->identity->id;
$user = \app\models\Hosts::find()->where(['user_id' => $userId])->one();
if (count($user) != 1) {
    ?>
            <?php 
    if ($type == 1) {
        ?>
                <h1><?php 
        echo Yii::t('app', 'Private Home');
        ?>
</h1>
                <p><?php 
        echo Yii::t('app', 'How would you describe your house hold');
        ?>
</p>
                <?php 
        echo Html::a('Single', ['hosts/create', 'type' => 1, 'about' => 1], ['class' => 'btn btn-success']);
 /**
  * Finds the Hosts model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Hosts the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Hosts::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }