本文整理汇总了PHP中source\LuLu::setViewParam方法的典型用法代码示例。如果您正苦于以下问题:PHP LuLu::setViewParam方法的具体用法?PHP LuLu::setViewParam怎么用?PHP LuLu::setViewParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类source\LuLu
的用法示例。
在下文中一共展示了LuLu::setViewParam方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionDetail
/**
* 内容页
* @param unknown $id
* @return \yii\base\string
*/
public function actionDetail($id)
{
Content::updateAllCounters(['view_count' => 1], ['id' => $id]);
$locals = $this->getDetail($id);
$taxonomyModel = $this->taxonomyService->getTaxonomyById($locals['model']['taxonomy_id']);
LuLu::setViewParam(['taxonomyModel' => $taxonomyModel]);
$locals['taxonomyModel'] = $taxonomyModel;
$vars = $this->getDetailVars($locals['taxonomyModel'], $locals['model']);
$this->layout = $vars['layout'];
return $this->render($vars['view'], $locals);
}
示例2: actionList
public function actionList($taxonomy = -1)
{
$query = Content::find();
$query->where(['content_type' => $this->content_type]);
if ($taxonomy !== -1) {
$query->andFilterWhere(['taxonomy_id' => $taxonomy]);
}
$taxonomyModel = $this->taxonomyService->getTaxonomyById($taxonomy);
$vars = $this->getListVars($taxonomyModel);
$locals = LuLu::getPagedRows($query, ['orderBy' => 'created_at desc', 'pageSize' => $vars['pageSize']]);
$locals['taxonomyModel'] = $taxonomyModel;
LuLu::setViewParam(['taxonomyModel' => $taxonomyModel]);
$this->layout = $vars['layout'];
return $this->render($vars['view'], $locals);
}
示例3:
use source\LuLu;
use source\libs\Common;
use source\core\widgets\ActiveForm;
use source\models\Takonomy;
use source\models\Content;
use source\libs\TreeHelper;
use source\libs\Resource;
use source\libs\Constants;
/* @var $this yii\web\View */
/* @var $model app\models\Content */
/* @var $form yii\widgets\ActiveForm */
$filedOptions = [];
$takonomy = $this->getConfigValue('post_takonomy');
$takonomies = Takonomy::getArrayTree($takonomy);
$options = TreeHelper::buildTreeOptions($takonomies, $model->takonomy_id);
LuLu::setViewParam(['defaultLayout' => false]);
$template2 = "{label}\n{input}\n{error}\n{hint}";
$template4 = "{label}\n<div class=\"da-form-item small\" style=\"margin-left:0px;\">{input}\n{error}</div>\n{hint}";
//$template4="<div class=\"da-form-col-4-8\">{label}</div>\n<div class=\"da-form-col-2-8\" style=\"margin-left:0px;\">{input}\n{error}</div>\n{hint}";
?>
<?php
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data', 'class' => 'da-form'], 'fieldConfig' => ['size' => 'default']]);
?>
<div class="da-form-inline">
<div class="grid_3">
<div class="da-panel">
<div class="da-panel-header">
<span class="da-panel-title">
<img src="<?php
示例4: toolbars
public function toolbars($bars = [])
{
LuLu::setViewParam(['toolbars' => $bars]);
}