<?php
namespace Jaxon\App\Test;
use Jaxon\Request\Factory as xr;
use Jaxon\Laravel\Controller as JaxonController;
class Pgw extends JaxonController
{
public function sayHello($isCaps)
{
if ($isCaps)
$text = 'HELLO WORLD!';
else
$text = 'Hello World!';
$this->response->assign('div1', 'innerHTML', $text);
$this->response->toastr->success("div1 text is now $text");
return $this->response;
}
public function setColor($sColor)
{
$this->response->assign('div1', 'style.color', $sColor);
$this->response->toastr->success("div1 color is now $sColor");
return $this->response;
}
public function showDialog()
{
$buttons = array(array('title' => 'Close', 'class' => 'btn', 'click' => 'close'));
$options = array('maxWidth' => 400);
$this->response->pgw->modal("Modal Dialog", "This modal dialog is powered by PgwModal!!", $buttons, $options);
return $this->response;
}
}
|