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


PHP Session::getFlash方法代码示例

本文整理汇总了PHP中yii\web\Session::getFlash方法的典型用法代码示例。如果您正苦于以下问题:PHP Session::getFlash方法的具体用法?PHP Session::getFlash怎么用?PHP Session::getFlash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\web\Session的用法示例。


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

示例1:

                </div>
            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div>
   
    <div class="row">
        <?php 
Pjax::begin();
?>
   
        <div class="col-lg-9">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">รายการใบสั่งงาน  <span class="badge bg-yellow-active">
                            <?php 
if (!empty($session->getFlash('msg'))) {
    ?>
                                <?php 
    echo $session->getFlash('msg');
    ?>
                            <?php 
} else {
    ?>
                                All
                            <?php 
}
?>
</span> </h3>
                    <div class="box-tools">
                        <ul class="pagination pagination-sm no-margin pull-right">
开发者ID:nirantarnoy,项目名称:paperless,代码行数:30,代码来源:index.php

示例2:

$sale = new \backend\models\Saledata();
$country = new \backend\models\Country();
$saleorline = new \backend\models\Saleorderline();
//   Yii::$app->params['uploadPath'] = realpath(Yii::$app->basePath) . '/uploads/icon/';
Yii::$app->params['uploadPath'] = '../../uploads/icon/';
//   echo  Yii::$app->params['uploadPath'];
?>
    <?php 
$form = ActiveForm::begin(['id' => 'myform', 'options' => ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data']]);
?>
   <div class="salenoid"  <?php 
echo "id={$model->recid}";
?>
></div>
   <?php 
if (!empty($session->getFlash('msgsuccess'))) {
    ?>
    <div class="alert alert-success alert-dismissable" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <?php 
    echo $session->getFlash('msgsuccess');
    ?>
        </div>
        <?php 
}
?>
   <?php 
if (!empty($session->getFlash('msgerror'))) {
    ?>
    <div class="alert alert-danger alert-dismissable" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
开发者ID:nirantarnoy,项目名称:st2,代码行数:31,代码来源:_form.php

示例3: Session

<?php

use yii\widgets\LinkPager;
use yii\web\Session;
$session = new Session();
$session->open();
?>

<div class="panel">
  <div class="panel-body">
    <h4>หนังสือรับ</h4>
    <hr>

    <?php 
if (!empty($session->getFlash('message'))) {
    ?>
    <div class="alert alert-success">
      <i class="glyphicon glyphicon-ok"></i>
      <?php 
    echo $session['message'];
    ?>
    </div>
    <?php 
}
?>

    <a href="index.php?r=book/form" class="btn btn-primary">
      <i class="glyphicon glyphicon-plus"></i>
      ลงหนังสือรับใหม่
    </a>
开发者ID:pichai2514,项目名称:gov_book2016,代码行数:30,代码来源:Index1.php

示例4: getFlash

 /**
  * Returns a flash message.
  * @param string $key the key identifying the flash message
  * @param mixed $defaultValue value to be returned if the flash message does not exist.
  * @param boolean $delete whether to delete this flash message right after this method is called.
  * If false, the flash message will be automatically deleted in the next request.
  * @return mixed the flash message
  * @see setFlash()
  * @see hasFlash()
  * @see getAllFlashes()
  * @see removeFlash()
  */
 public function getFlash($key, $defaultValue = null, $delete = false)
 {
     $this->updateFlashCounters();
     return parent::getFlash($key, $defaultValue, $delete);
     // TODO: Change the autogenerated stub
 }
开发者ID:albertborsos,项目名称:yii2-lib,代码行数:18,代码来源:Session.php

示例5: Session

<?php

use yii\widgets\ActiveForm;
use yii\web\Session;
use yii\helpers\Html;
$session = new Session();
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
if ($session->hasFlash('message')) {
    ?>
<div class="alert alert-danger" role="alert"><?php 
    echo $session->getFlash('message');
    ?>
</div>
<?php 
}
?>
<div class="site-login">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>Please fill out the following fields to login:</p>

    <?php 
$form = ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'form-horizontal'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-1 control-label']]]);
?>

        <?php 
echo $form->field($login, 'usr')->label("Username");
开发者ID:riskiidice,项目名称:Yii2project,代码行数:31,代码来源:login.php

示例6: Session

use yii\helpers\Html;
//use yii\grid\GridView;
use kartik\grid\GridView;
use yii\web\Session;
$session = new Session();
$session->open();
/* @var $this yii\web\View */
/* @var $searchModel backend\models\Car4Search */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'รายชื่อรถยนต์';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="car4-index">

    <?php 
if ($session->getFlash('msg')) {
    ?>
    <div class="alert alert-success alert-dismissable" role="alert">
          <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <?php 
    echo $session->getFlash('msg');
    ?>
    </div>
    <?php 
}
?>
    <h3><?php 
echo Html::encode($this->title);
?>
</h3>
    <?php 
开发者ID:nirantarnoy,项目名称:Tapp_Final,代码行数:31,代码来源:index.php


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