當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Utility::setFlash方法代碼示例

本文整理匯總了PHP中Utility::setFlash方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utility::setFlash方法的具體用法?PHP Utility::setFlash怎麽用?PHP Utility::setFlash使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Utility的用法示例。


在下文中一共展示了Utility::setFlash方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionDelete

 public function actionDelete($id)
 {
     $page = $this->loadModel($id);
     $page->delete();
     Utility::setFlash('page deleted successfully.', 'success');
     $this->redirect($this->createUrl('page/listing'));
 }
開發者ID:priyranjansingh,項目名稱:getleads,代碼行數:7,代碼來源:PageController.php

示例2: actionDelete

 public function actionDelete()
 {
     $id = Yii::app()->request->getParam('id');
     $user = User::model()->findByPk($id);
     $user->delete();
     Utility::setFlash('User deleted successfully', 'success');
     $this->redirect(Yii::app()->createUrl('/admin/user/list'));
 }
開發者ID:priyranjansingh,項目名稱:getleads,代碼行數:8,代碼來源:UserController.php

示例3: run

 public function run()
 {
     $formModel = new ChangePasswordForm();
     if (isset($_POST['ChangePasswordForm'])) {
         $formModel->attributes = $_POST['ChangePasswordForm'];
         if ($formModel->validate()) {
             $user = User::model()->findByPk(Yii::app()->user->getId());
             $user->password = md5($formModel->password);
             $user->save(false);
             Utility::setFlash('Password changed successfully.', 'success');
         }
     }
     $this->getController()->render('change_password', array('formModel' => $formModel));
 }
開發者ID:priyranjansingh,項目名稱:getleads,代碼行數:14,代碼來源:ChangePasswordAction.php

示例4: actionDelete

 public function actionDelete()
 {
     $id = Yii::app()->request->getParam('id');
     $qr = $this->loadModel($id);
     Log::model()->deleteAll('qr_id = :qr_id', array(':qr_id' => $id));
     $qr->delete();
     Utility::setFlash(Yii::t('dict', 'Deleted successfully.'), 'success');
     $this->redirect(array('list'));
 }
開發者ID:priyranjansingh,項目名稱:getleads,代碼行數:9,代碼來源:QrController.php

示例5: actionEmail_verify

 public function actionEmail_verify()
 {
     $code = trim(Yii::app()->request->getQuery('code'));
     if ($code) {
         $user = User::model()->findByAttributes(array('auth_code' => $code));
         if ($user) {
             $user->is_active = 1;
             $user->auth_code = md5(uniqid());
             $user->save();
             Utility::setFlash('Your email has been verified. Please login below.', 'success');
             Yii::app()->request->redirect('login');
         }
     }
     echo 'invalid code';
     Yii::app()->end();
 }
開發者ID:priyranjansingh,項目名稱:getleads,代碼行數:16,代碼來源:UserController-old.php


注:本文中的Utility::setFlash方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。