コード例 #1
0
ファイル: AppHelperTest.php プロジェクト: redarrow/kanboard
 public function testFlashMessage()
 {
     $h = new App($this->container);
     $s = new Session();
     $this->assertEmpty($h->flashMessage());
     $s->flash('test & test');
     $this->assertEquals('<div class="alert alert-success alert-fade-out">test &amp; test</div>', $h->flashMessage());
     $this->assertEmpty($h->flashMessage());
     $this->assertEmpty($h->flashMessage());
     $s->flashError('test & test');
     $this->assertEquals('<div class="alert alert-error">test &amp; test</div>', $h->flashMessage());
     $this->assertEmpty($h->flashMessage());
 }
コード例 #2
0
ファイル: base.php プロジェクト: antonivargas/bkpsite
 /**
  * Redirection when there is no project in the database
  *
  * @access protected
  */
 protected function redirectNoProject()
 {
     $this->session->flash(t('There is no active project, the first step is to create a new project.'));
     $this->response->redirect('?controller=project&action=create');
 }
コード例 #3
0
function flash($name, $value = null)
{
    return Session::flash($name, $value);
}