当前位置: 首页>>代码示例>>PHP>>正文


PHP widgets\Alert类代码示例

本文整理汇总了PHP中common\widgets\Alert的典型用法代码示例。如果您正苦于以下问题:PHP Alert类的具体用法?PHP Alert怎么用?PHP Alert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Alert类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionIndex

 public function actionIndex($url)
 {
     $model = Page::findOne(['url' => $url]);
     if (!$model) {
         Alert::add('Strona nie została znaleziona', Alert::TYPE_ERROR);
         return $this->goHome();
     }
     return $this->render('index', ['model' => $model]);
 }
开发者ID:jedzura,项目名称:nzs,代码行数:9,代码来源:PageController.php

示例2: actionIndex

 /**
  * @param string $url
  * @return string
  */
 public function actionIndex($url)
 {
     $model = Group::findOne(['url' => $url]);
     if (!$model) {
         Alert::add(Yii::t('msg', 'Page not found.'), Alert::TYPE_ERROR);
         return $this->goHome();
     }
     return $this->render('index', ['model' => $model]);
 }
开发者ID:jedzura,项目名称:nzs,代码行数:13,代码来源:GroupController.php

示例3: actionUpdate

 public function actionUpdate($id = null)
 {
     /** @var User $model */
     $model = User::findOne(Yii::$app->user->getIdentity()->id);
     $model->setScenario('update');
     if ($model->load(Yii::$app->request->post())) {
         if ($model->newPassword) {
             $model->setPassword($model->newPassword);
         }
         if ($model->save()) {
             Alert::add(Yii::t('msg', 'Operation completed successfully.'));
         }
     }
     return $this->render('update', ['model' => $model]);
 }
开发者ID:jedzura,项目名称:nzs,代码行数:15,代码来源:UserController.php

示例4: date

    $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
    $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
} else {
    $menuItems[] = ['label' => 'My Account', 'url' => ['/user/index']];
    $menuItems[] = ['label' => 'Logout(' . Yii::$app->session->get('user.name') . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']];
}
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo Alert::widget();
?>
        <?php 
echo $content;
?>
    </div>
</div>

<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; Feed-Cloud <?php 
echo date('Y');
?>
</p>

        <p class="pull-right"><?php 
开发者ID:vihanga-liyanage,项目名称:feed-cloud,代码行数:31,代码来源:main.php

示例5:

 * @var $video_form ProductVideo
 * @var $video_form_upload ProductVideoForm
 */
use bl\cms\shop\backend\components\form\ProductVideoForm;
use bl\cms\shop\common\entities\Product;
use bl\cms\shop\common\entities\ProductVideo;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
?>

    <br>

    <!--ALERT WIDGET-->
<?php 
echo \common\widgets\Alert::widget(['options' => ['class' => 'alert-fade']]);
?>

    <table class="col-md-12 table-bordered table-condensed table-stripped table-hover">
        <thead class="thead-inverse">
        <tr>
            <th class="text-center" colspan="4">
                <h2><?php 
echo \Yii::t('shop', 'Video');
?>
</h2>
            </th>
        </tr>
        <?php 
if (!empty($product->videos)) {
    ?>
开发者ID:black-lamp,项目名称:blcms-shop,代码行数:31,代码来源:add-video.php

示例6: isset

</small>
                <?php 
}
?>
            </h1>
            <?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => '<i class="fa fa-dashboard"></i> ' . Yii::t('app', 'Home'), 'url' => ['/']], 'encodeLabels' => false, 'tag' => 'ol', 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="box box-primary">
                <div class="box-body">
                    <?php 
echo \common\widgets\Alert::widget();
?>
                    <?php 
echo $content;
?>
                </div>
            </div>
        </section><!-- /.content -->
    </div>

    <?php 
$this->endBody();
?>
    </body>
    </html>
<?php 
开发者ID:davidfang,项目名称:yii2-adminlte,代码行数:31,代码来源:main.php

示例7:

?>
			<?php 
echo $form->field($model, 'rememberMe')->checkbox();
?>
			
			<?php 
echo Html::a(Yii::t('app', 'LoginForm_fogot_password'), ['site/request-password-reset'], ['class' => 'login-modal-fogot-pass']);
?>
			<div class="clr"></div>     
		</div>
    <?php 
ActiveForm::end();
?>
    
    <?php 
echo Alert::widget(['closeButton' => ['tag' => 'a', 'label' => ' ']]);
?>
    
    <?/*
    <div class="body-error">
        <h3>Неверный пароль</h3>
        <a href="#" class="close"></a>
    </div>
	*/?>
   
    <div class="body-login">
        <span><?php 
echo Yii::t('app', 'LoginForm_not_reg');
?>
</span>
        <a href="<?php 
开发者ID:aldegtyarev,项目名称:fantasy,代码行数:31,代码来源:login-modal.php

示例8: actionResetPassword

 /**
  * Resets password.
  *
  * @param string $token
  * @return mixed
  * @throws BadRequestHttpException
  */
 public function actionResetPassword($token)
 {
     try {
         $model = new ResetPasswordForm($token);
     } catch (InvalidParamException $e) {
         throw new BadRequestHttpException($e->getMessage());
     }
     if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->resetPassword()) {
         Alert::add(Yii::t('msg', 'New password was saved. Now you can log in.'));
         return $this->goHome();
     }
     return $this->render('resetPassword', ['model' => $model]);
 }
开发者ID:jedzura,项目名称:nzs,代码行数:20,代码来源:SiteController.php


注:本文中的common\widgets\Alert类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。