/** * @param $attribute * @param $params * * @return bool */ public function validateDb($attribute, $params) { if (!$this->hasErrors('connection')) { $totalDbCount = $this->module->totalDbCount(); if ($this->{$attribute} >= $totalDbCount[$this->connection]) { $this->addError($attribute, Redisman::t('redisman', 'Database with current number not allowed for this connection')); return false; } return true; } else { return false; } }
public function testSearchId() { $this->module->greedySearch = false; $this->module->setConnection('local', 1); $model = new RedisModel(); $model->setAttributes(['pattern' => 'testfxt:*', 'type' => ['string', 'list'], 'perpage' => 30]); $model->validate(); $func = $this->getProtected('getSearchId'); $searchId = $func->invoke($model); Debug::debug($searchId); $expect = 'testfxt:*:stringlist:30:local:1:'; $this->assertEquals($expect, $searchId); $this->module->greedySearch = true; $model->setAttributes(['pattern' => '*:*', 'type' => ['set', 'zset'], 'perpage' => 20]); $model->validate(); $searchId = $func->invoke($model); Debug::debug($searchId); $expect = '*:*:setzset:20:local:1:1'; $this->assertEquals($expect, $searchId); $this->module->setConnection('remote1', 0); $model = new RedisModel(); $model->setAttributes(['pattern' => '*fxt*', 'perpage' => 30]); $model->validate(); $func = $this->getProtected('getSearchId'); $searchId = $func->invoke($model); Debug::debug($searchId); $expect = '*fxt*:stringsetlistzsethash:30:remote1:0:1'; $this->assertEquals($expect, $searchId); }
public function testFind() { $this->assertEquals('localnat', $this->module->getCurrentConn()); $this->assertInstanceOf('insolita\\redisman\\components\\PhpredisConnection', $this->module->getConnection()); $res = RedisItem::find('tfx_string'); $this->assertNotEmpty($res); $this->assertEquals($res->value, null); $this->assertEquals($res->formatvalue, null); $this->assertEquals($res->type, 'string'); $this->assertEquals($res->ttl, -1); $res = RedisItem::find('tfx_string')->findValue(); $this->assertNotEmpty($res); $this->assertEquals(13, $res->size); $this->assertEquals($res->value, 'somestringval'); $this->assertEquals($res->formatvalue, 'somestringval'); $res = RedisItem::find('tfx_list')->findValue(); Debug::debug($res->getValue()); Debug::debug($res->getAttributes()); $this->assertNotEmpty($res); $this->assertEquals(3, $res->size); $this->assertEquals($res->value, ['someval1', 'someval2', 'someval3']); $this->assertEquals($res->formatvalue, "someval1\r\nsomeval2\r\nsomeval3"); $res = RedisItem::find('tfx_set')->findValue(); $this->assertNotEmpty($res); Debug::debug($res->getValue()); Debug::debug($res->getAttributes()); $this->assertEquals(4, $res->size); $this->assertTrue(in_array('someval4', $res->value)); $this->assertTrue(in_array('someval1', $res->value)); $this->assertEquals($res->formatvalue, implode("\r\n", $res->value)); $res = RedisItem::find('tfx_hash')->findValue(); Debug::debug($res->getValue()); Debug::debug($res->getAttributes()); $this->assertNotEmpty($res); $this->assertEquals(1, $res->size); $this->assertEquals(['hashfield' => 'hashval'], $res->value); $this->assertAttributeInstanceOf('\\yii\\data\\ArrayDataProvider', 'formatvalue', $res); $res = RedisItem::find('tfx_zset')->findValue(); Debug::debug($res->getValue()); Debug::debug($res->getAttributes()); $this->assertNotEmpty($res); $this->assertEquals(3, $res->size); $this->assertEquals(['someval2' => 3, 'someval1' => 4, 'someval3' => 8], $res->value); $this->assertAttributeInstanceOf('\\yii\\data\\ArrayDataProvider', 'formatvalue', $res); $this->setExpectedException('yii\\web\\NotFoundHttpException'); $res = RedisItem::find('iugigigi giu')->findValue(); }
/** * @depends testEscapeQuotes **/ public function testInfoScript() { $start = microtime(false); $conn = $this->module->setConnection('remote1', 1); $res = $conn->executeCommand('EVAL', [$this->buildInfoScript('Queue:YProxy'), 0]); $end = microtime(false) - $start; Debug::debug($res); Debug::debug('time - ' . $end); }
public function testFixturizer() { $fixter = new RedisFixts(); $fixter->createFixtures(); $this->module->setConnection('local', 1); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_string'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_hash'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_list'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_set'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_zset'])); $this->assertEquals(-1, $this->module->executeCommand('TTL', ['tfx_hash'])); $this->assertNotEquals(-1, $this->module->executeCommand('TTL', ['tfx_stringexp'])); $this->assertNotEquals(-1, $this->module->executeCommand('TTL', ['tfx_listexp'])); $fixter->deleteFixtures(); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_string'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_hash'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_list'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_set'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_zset'])); }
public function testCreate() { $model = new RedisItem(); $model->scenario = 'create'; $model->setAttributes(['key' => 'newstringkey', 'ttl' => 2000, 'formatvalue' => 'h ehfif ierireh ei', 'type' => 'string']); $this->assertTrue($model->validate()); $model->create(); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['newstringkey'])); $tmodel = RedisItem::find('newstringkey')->findValue(); $this->assertLessThanOrEqual(2000, $tmodel->ttl); $this->assertNotEquals(-1, $tmodel->ttl); }
/** * @return \yii\web\Response */ public function actionMove() { $model = new RedisItem(); $model->scenario = 'move'; if ($model->load(\Yii::$app->request->post()) && $model->validate()) { $model->move(); \Yii::$app->session->setFlash('success', Redisman::t('redisman', 'Key moved from Db№ {from} to {to}', ['from' => $this->module->getCurrentDb(), 'to' => $model->db])); } else { \Yii::$app->session->setFlash('error', Html::errorSummary($model, ['encode' => true])); } return $this->redirect(Url::to(['/redisman/default/show'])); }
/** * @return bool|string */ public function actionDbload() { $connect = \Yii::$app->request->post('connection'); $totalDb = $this->module->totalDbCount(); if (isset($totalDb[$connect])) { $dblist = ''; for ($i = 0; $i < $totalDb[$connect]; $i++) { $dblist .= Html::tag('div', 'Db №' . $i, ['data-value' => $i, 'class' => 'item']); } return $dblist; } else { return false; } }
<div class="one"> <button class="ui blue icon button submit"><i class="save icon"></i><?php echo Yii::t('app', 'Save'); ?> </button> </div> <?php \Zelenin\yii\SemanticUI\widgets\ActiveForm::end(); ?> </div> </div> <div class="column"> <div class="ui segment"> <a class="ui right ribbon blue label"><?php echo Redisman::t('redisman', 'Operations log'); ?> </a> <div style="min-height: 250px;max-height: 600px" class="ui bulleted divided list"> <?php foreach ($lastlog as $log) { ?> <?php echo \yii\helpers\Html::tag('div', $log, ['class' => 'item']); ?> <?php } ?> </div> </div> </div>
<div class="ui centered padded stackable grid"> <?php echo \Zelenin\yii\SemanticUI\collections\Menu::widget(['topAttached' => true, 'fluid' => true, 'inverted' => true, 'options' => ['class' => 'centered '], 'items' => [['url' => ['/'], 'label' => \insolita\redisman\Redisman::t('redisman', 'Main')], ['url' => ['/site/about'], 'label' => \insolita\redisman\Redisman::t('redisman', 'About')], ['url' => ['/site/logout'], 'options' => ['data-method' => 'post'], 'label' => \insolita\redisman\Redisman::t('redisman', 'Logout'), 'visible' => !Yii::$app->user->isGuest]]]); ?> </div>
*/ $module = $this->context->module; $model = new \insolita\redisman\models\RedisModel(); $model->restoreFilter(); $form = \Zelenin\yii\SemanticUI\widgets\ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'ui form attached fluid'], 'enableClientValidation' => true, 'method' => 'post', 'action' => \yii\helpers\Url::to(['/redisman/default/search'])]); echo $form->errorSummary($model); ?> <div class="one"> <?php echo $form->field($model, 'pattern')->textInput()->hint(Redisman::t('redisman', 'support redis patterns (*,?,[var])')); ?> </div> <div class="one"> <?php echo $form->field($model, 'type')->checkboxList([Redisman::REDIS_STRING => Redisman::t('redisman', 'string'), Redisman::REDIS_HASH => Redisman::t('redisman', 'hash'), Redisman::REDIS_LIST => Redisman::t('redisman', 'list'), Redisman::REDIS_SET => Redisman::t('redisman', 'set'), Redisman::REDIS_ZSET => Redisman::t('redisman', 'zset')]); ?> </div> <div class="one"> <?php echo $form->field($model, 'perpage')->dropDownList([20 => 20, 30 => 30, 50 => 50, 100 => 100, 200 => 200, 500 => 500]); ?> </div> <div class="one"> <?php echo $form->field($model, 'encache')->checkbox([]); ?> </div><br/> <div class="one right aligned"> <?php echo Elements::button('<i class="find icon"></i>' . Yii::t('app', 'Search'), ['class' => 'teal circular right ui aligned', 'type' => 'submit', 'tag' => 'button']);
/** * Prepare lua search script for greedy search type * @return string */ protected function scriptBuilderGreedy() { $pattern = Redisman::quoteValue($this->pattern); $typecond = $this->typeCondBuilder(); $scriptScan = <<<EOF local all_keys = {}; local keys = {}; local done = false; local cursor = "0" local count=0; local size=0 local tp repeat local result = redis.call("SCAN", cursor, "match", {$pattern}, "count", 50) cursor = result[1]; keys = result[2]; for i, key in ipairs(keys) do tp=redis.call("TYPE", key)["ok"] if {$typecond} then if tp == "string" then size=redis.call("STRLEN", key) elseif tp == "hash" then size=redis.call("HLEN", key) elseif tp == "list" then size=redis.call("LLEN", key) elseif tp == "set" then size=redis.call("SCARD", key) elseif tp == "zset" then size=redis.call("ZCARD", key) else size=9999 end all_keys[#all_keys+1] = {key, tp, size, redis.call("TTL", key)}; end if {$typecond} then count=count+1 end end if cursor == "0" then done = true; end until done all_keys[#all_keys+1]=count; return all_keys; EOF; $scriptKeys = <<<EOF local all_keys = {}; local count=0; local size=0 local tp local result = redis.call("KEYS", {$pattern}) for i, key in ipairs(result) do tp=redis.call("TYPE", key)["ok"] if {$typecond} then if tp == "string" then size=redis.call("STRLEN", key) elseif tp == "hash" then size=redis.call("HLEN", key) elseif tp == "list" then size=redis.call("LLEN", key) elseif tp == "set" then size=redis.call("SCARD", key) elseif tp == "zset" then size=redis.call("ZCARD", key) else size=9999 end all_keys[#all_keys+1] = {key, tp, size, redis.call("TTL", key)}; end if {$typecond} then count=count+1 end end all_keys[#all_keys+1]=count; return all_keys; EOF; return Redisman::getInstance()->searchMethod == 'SCAN' ? $scriptScan : $scriptKeys; }
public function deleteFixtures() { $this->module->executeCommand('FLUSHDB'); }
/** * Generate script for searching key information * * @param string $key * * @return string */ protected static function infoScript($key) { $key = Redisman::quoteValue($key); $script = <<<EOF local tp=redis.call("TYPE", {$key})["ok"] local size=9999 if tp == "string" then size=redis.call("STRLEN", {$key}) elseif tp == "hash" then size=redis.call("HLEN", {$key}) elseif tp == "list" then size=redis.call("LLEN", {$key}) elseif tp == "set" then size=redis.call("SCARD", {$key}) elseif tp == "zset" then size=redis.call("ZCARD", {$key}) else size=9999 end local info={tp, size, redis.call("TTL", {$key}), redis.call("OBJECT","REFCOUNT", {$key}),redis.call("OBJECT","IDLETIME", {$key}), redis.call("OBJECT", "ENCODING", {$key})}; return info; EOF; return $script; }
echo $form->errorSummary($model); ?> <div class="one"> <?php echo $form->field($model, 'connection')->dropDownList($module->connectionList(), ['id' => 'currentcon']); ?> </div> <div class="one"> <?php echo $form->field($model, 'db')->dropDownList($module->dbList(), ['id' => 'currentdb']); ?> </div><br/> <div class="one right ui aligned"> <?php echo Elements::button('<i class="plug icon"></i>' . \insolita\redisman\Redisman::t('redisman', 'Connect'), ['class' => 'green circular right aligned', 'type' => 'submit', 'tag' => 'button']); ?> </div> <?php ActiveForm::end(); $js = new \yii\web\JsExpression('var url="' . \yii\helpers\Url::to(['/redisman/default/dbload']) . '"; var cur=$("#connectionform-connection").val(); $("#currentcon").dropdown ({ onChange: function(value, text, $selectedItem) { console.log(value + "|"+ cur); if(value && value!=cur) { cur=value;
/** * @param $name * @param $db * * @return \yii\redis\Connection * @throws ErrorException */ public function setConnection($name, $db = null) { if (!isset($this->connections[$name])) { throw new ErrorException(self::t('redisman', 'Wrong redis connection name')); } else { $oldcon = $this->_conCurrent; $olddb = $this->_dbCurrent; try { $this->_conCurrent = $name; $this->_connect = $this->getConnection(true, $db); } catch (Exception $e) { \Yii::$app->session->setFlash('error', Redisman::t('redisman', 'Can`t set connection with ' . $name) . "\n" . $e->getMessage()); $this->_conCurrent = $oldcon; $this->_connect = $this->getConnection(true, $olddb); } \Yii::$app->session->set('RedisManager_conCurrent', $this->_conCurrent); \Yii::$app->session->set('RedisManager_dbCurrent', $this->_dbCurrent); return $this->_connect; } }
/** * @param string $name * @param array $params * * @return mixed * @throws Exception */ public function executeCommand($name, $params = []) { $this->open(); if (!isset($this->redisCommands[$name])) { throw new Exception(Redisman::t('redisman', 'Method ' . $name . ' not supported by ' . get_class($this) . ' yet')); } $name = $this->redisCommands[$name]; $i = 0; while ($i < 15) { try { return call_user_func_array(array($this->_socket, $name), $params); } catch (\RedisException $e) { if ($i < 5) { $this->handle_exception($e, $name, $params); usleep(100); $i++; } elseif ($i < 15) { $this->handle_exception($e, $name, $params); usleep(500); $i++; } else { $this->handle_exception($e, $name, $params, false); break; } } catch (Exception $e) { $this->handle_exception($e, $name, $params, false); break; } } }
?> <?php } elseif ($model->type == Redisman::REDIS_HASH) { ?> <?php echo $this->render('form_hash', ['model' => $model]); ?> <?php } else { ?> <?php echo $this->render('form_zset', ['model' => $model]); ?> <?php } ?> </div> </div> </div> <?php if (\yii\helpers\Url::previous('show')) { ?> <?php echo Html::a('<i class="icon backward"></i>' . Redisman::t('redisman', 'Go back'), \yii\helpers\Url::previous('show'), ['class' => 'ui icon blue button']); ?> <?php } ?> </div> <?php $this->registerJs("\$('.tabular.menu .item').tab();");
<div class="ui centered padded stackable grid"> <?php echo \Zelenin\yii\SemanticUI\collections\Menu::widget(['topAttached' => true, 'fluid' => true, 'inverted' => true, 'options' => ['class' => 'centered '], 'items' => [['url' => ['/'], 'label' => \insolita\redisman\Redisman::t('redisman', 'Main')], ['url' => ['/site/about'], 'label' => \insolita\redisman\Redisman::t('redisman', 'About')], ['url' => ['/log/index'], 'label' => Yii::t('app', 'Actions Log')], ['label' => Yii::t('app', 'Language'), 'items' => [['url' => ['/redisman/default/index', 'lang' => 'ru'], 'label' => Yii::t('app', 'Russian')], ['url' => ['/redisman/default/index', 'lang' => 'en'], 'label' => Yii::t('app', 'English')]]], ['url' => ['/site/logout'], 'options' => ['data-method' => 'post'], 'label' => \insolita\redisman\Redisman::t('redisman', 'Logout'), 'visible' => !Yii::$app->user->isGuest]]]); ?> </div>
<i class="icon options"></i> <?php echo Redisman::t('redisman', 'Connection Settings'); ?> </div> <div class="text item"> <?php echo $this->render('_connectform'); ?> </div> <div class="header item"> <i class="icon search"></i><?php echo Redisman::t('redisman', 'Search Key'); ?> </div> <div class="text item"> <?php echo $this->render('_searchform'); ?> </div> <div class="header item"> <i class="icon database"></i> <?php echo Redisman::t('redisman', 'Db Operations'); ?> </div> <?php echo Html::a('<i class="icon save"></i> ' . Redisman::t('redisman', 'Save database'), ['/redisman/default/savedb'], ['class' => 'active green item']); ?> <?php echo Html::a('<i class="icon trash outline"></i> ' . Redisman::t('redisman', 'Flush database'), ['/redisman/default/flushdb'], ['data-method' => 'post', 'data-confirm' => Redisman::t('redisman', 'You really want to do it?'), 'class' => 'active red item']); ?> </div>
<?php use insolita\redisman\Redisman; use yii\helpers\Html; use Zelenin\yii\SemanticUI\widgets\DetailView; /** * @var \yii\web\View $this * @var \insolita\redisman\controllers\DefaultController $context * @var \insolita\redisman\Redisman $module * @var \insolita\redisman\models\RedisItem $model */ $module = $this->context->module; $this->title = $module->getCurrentName(); ?> <div class="ui raised segment"> <a class="ui ribbon teal label"><?php echo Redisman::keyTyper($model->type); ?> </a> <span><i class="icon privacy"></i><?php echo Html::encode($model->key); ?> </span> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['size', 'ttl', 'refcount', 'idletime', 'db', 'encoding', ['label' => Redisman::t('redisman', 'Value'), 'format' => 'raw', 'value' => is_array($model->value) ? Html::encode(\yii\helpers\VarDumper::dumpAsString($model->value, 10, false)) : Html::encode($model->formatvalue)]]]); ?> </div>
<div class="ui orange segment"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => '\\Zelenin\\yii\\SemanticUI\\widgets\\CheckboxColumn'], 'key', 'type', 'size', 'ttl', ['class' => '\\yii\\grid\\ActionColumn', 'template' => '{quick} {view} {delete}', 'buttons' => ['quick' => function ($url, $model) { return Html::a('<i class="icon circular large eye green"></i>', \yii\helpers\Url::to(['/redisman/item/quick', 'key' => urlencode($model['key'])]), ['data-pjax' => 0, 'class' => 'modalink', 'title' => Yii::t('app', 'Quick View')]); }, 'view' => function ($url, $model) { return Html::a('<i class="icon circular inverted eye green"></i>', \yii\helpers\Url::to(['/redisman/item/view', 'key' => urlencode($model['key'])]), ['data-pjax' => 0, 'title' => Yii::t('app', 'View')]); }, 'delete' => function ($url, $model) { return Html::a('<i class="icon circular small trash red"></i>', \yii\helpers\Url::to(['/redisman/item/delete']), ['data-pjax' => 0, 'data-params' => ['RedisItem[key]' => urlencode($model['key'])], 'data-confirm' => 'Подтвердите действие', 'data-method' => 'post', 'title' => Yii::t('app', 'Delete')]); }]]]]); ?> </div> <?php $modal = \Zelenin\yii\SemanticUI\modules\Modal::begin(['id' => 'quickmodal', 'size' => \Zelenin\yii\SemanticUI\modules\Modal::SIZE_LARGE, 'header' => \insolita\redisman\Redisman::t('redisman', 'Key Information'), 'actions' => \Zelenin\yii\SemanticUI\Elements::button(\insolita\redisman\Redisman::t('redisman', 'Close'), ['class' => 'black'])]); ?> <div class="content"></div> <?php $modal::end(); $this->registerJs(' $(document).on("click",".modalink",function(e){ e.preventDefault(); var url=$(this).attr("href"); $.get(url,function(data){ $("#quickmodal .content").html(data); $("#quickmodal").modal({onHide:function(){ $("#quickmodal .content").html("");}}).modal("show"); }); }); ');
<?php use insolita\redisman\Redisman; use Zelenin\yii\SemanticUI\modules\Accordion; use yii\helpers\Html; /** * @var \yii\web\View $this * @var \insolita\redisman\controllers\DefaultController $context * @var \insolita\redisman\Redisman $module * @var array $info */ $module = $this->context->module; $this->title = $module->getCurrentName(); $infoformat = []; foreach ($info as $section => $data) { $content = ''; foreach ($data as $key => $val) { if ($key == 'rdb_last_save_time') { $val = date('d.m.Y H:i:s', $val); } $content .= Html::tag('tr', Html::tag('td', Redisman::t('redisman', $key)) . Html::tag('td', $val)); } $infoformat[] = ['title' => Redisman::t('redisman', $section), 'content' => Html::tag('table', $content, ['class' => "ui definition table"])]; } ?> <div class="ui blue segment"> <?php echo Accordion::widget(['styled' => true, 'fluid' => true, 'contentOptions' => ['encode' => false], 'items' => $infoformat]); ?> </div>
?> </button> </div> <?php \Zelenin\yii\SemanticUI\widgets\ActiveForm::end(); ?> </div> <div class="ui bottom attached tab segment" data-tab="tabappend"> <?php $form = \Zelenin\yii\SemanticUI\widgets\ActiveForm::begin(['action' => ['/redisman/item/append', 'key' => urlencode($model->key)]]); ?> <div class="one"> <?php $model->formatvalue = ''; echo $form->field($model, 'formatvalue')->widget(\lav45\aceEditor\AceEditorWidget::className(), ['mode' => 'text', 'fontSize' => 15, 'height' => 200, 'options' => ['id' => 'appendfield']]); ?> </div> <br/> <div class="one"> <button class="ui blue icon button submit"><i class="save icon"></i><?php echo Redisman::t('redisman', 'Append'); ?> </button> </div> <?php \Zelenin\yii\SemanticUI\widgets\ActiveForm::end(); ?> </div>
<div class="content"> <?php echo $module->getCurrentName(); ?> <div class="sub header"><?php echo Redisman::t('redisman', 'Current Connection'); ?> </div> </div> </h1> <?php echo Menu::widget(['pointing' => true, 'encodeLabels' => false, 'items' => [['label' => '<i class="info circle icon blue"></i>' . Redisman::t('redisman', 'Info'), 'url' => ['/redisman/default/index'], 'options' => ['class' => 'blue item']], ['label' => '<i class="privacy circle icon orange"></i>' . Redisman::t('redisman', 'List Keys'), 'url' => ['/redisman/default/show'], 'options' => ['class' => 'orange item']], ['label' => '<i class="add circle icon green"></i>' . Redisman::t('redisman', 'Add'), 'options' => ['class' => 'green item'], 'items' => [['label' => Redisman::keyTyper(Redisman::REDIS_STRING), 'url' => ['/redisman/item/create', 'type' => Redisman::REDIS_STRING]], ['label' => Redisman::keyTyper(Redisman::REDIS_LIST), 'url' => ['/redisman/item/create', 'type' => Redisman::REDIS_LIST]], ['label' => Redisman::keyTyper(Redisman::REDIS_HASH), 'url' => ['/redisman/item/create', 'type' => Redisman::REDIS_HASH]], ['label' => Redisman::keyTyper(Redisman::REDIS_SET), 'url' => ['/redisman/item/create', 'type' => Redisman::REDIS_SET]], ['label' => Redisman::keyTyper(Redisman::REDIS_ZSET), 'url' => ['/redisman/item/create', 'type' => Redisman::REDIS_ZSET]]]]]]); ?> <?php echo \insolita\redisman\widgets\Alert::widget(['encode' => false, 'successTitle' => Redisman::t('redisman', 'Success!'), 'errorTitle' => Redisman::t('redisman', 'Error!'), 'warningTitle' => Redisman::t('redisman', 'Warning!'), 'infoTitle' => Redisman::t('redisman', 'Attention!!')]); ?> <?php echo $content; ?> </div> </div> </div> <?php $this->endBody(); ?> </body> </html> <?php $this->endPage();