当前位置: 首页>>代码示例>>PHP>>正文


PHP LuLu::setViewParam方法代码示例

本文整理汇总了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);
 }
开发者ID:qq443140816,项目名称:lulucms2,代码行数:16,代码来源:BaseContentController.php

示例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);
 }
开发者ID:hucongyang,项目名称:lulucms2,代码行数:15,代码来源:BaseContentController.php

示例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 
开发者ID:shunzi250,项目名称:lulucms2,代码行数:31,代码来源:_form.php

示例4: toolbars

 public function toolbars($bars = [])
 {
     LuLu::setViewParam(['toolbars' => $bars]);
 }
开发者ID:hucongyang,项目名称:lulucms2,代码行数:4,代码来源:BackView.php


注:本文中的source\LuLu::setViewParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。