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


PHP Pjax::end方法代码示例

本文整理汇总了PHP中yii\widgets\Pjax::end方法的典型用法代码示例。如果您正苦于以下问题:PHP Pjax::end方法的具体用法?PHP Pjax::end怎么用?PHP Pjax::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\widgets\Pjax的用法示例。


在下文中一共展示了Pjax::end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     $this->registerScripts();
     if ($this->type == self::TYPE_INDEX) {
         Pjax::begin(['enablePushState' => false, 'enableReplaceState' => false, 'linkSelector' => '.pagination a']);
     }
     echo Html::tag('div', '', ['class' => 'ajax-crud-container ajax-crud-type-' . $this->type . ' ajax-crud-name-' . $this->name, 'id' => $this->getContainerId(), 'data' => ['type' => $this->type, 'name' => $this->name, 'container-index' => '#' . $this->getContainerId(self::TYPE_INDEX), 'container-create' => '#' . $this->getContainerId(self::TYPE_CREATE), 'container-update' => '#' . $this->getContainerId(self::TYPE_UPDATE)]]);
     if ($this->type == self::TYPE_INDEX) {
         Pjax::end();
     }
 }
开发者ID:omnilight,项目名称:yz2-admin,代码行数:11,代码来源:AjaxCrud.php

示例2: getPjaxEnd

 protected function getPjaxEnd()
 {
     $html = '';
     if ($this->pjax) {
         ob_start();
         Pjax::end();
         $html = ob_get_clean();
     }
     return $html;
 }
开发者ID:lukianovva,项目名称:clover,代码行数:10,代码来源:Table.php

示例3: run

 public function run()
 {
     if ($this->_pjax) {
         $this->_pjax->end();
     }
     parent::run();
 }
开发者ID:understeam,项目名称:yii2-ajax-dialog,代码行数:7,代码来源:DialogContainer.php

示例4: run

    public function run(){

        if($this->is_pjax){
            Pjax::begin($this->pjaxOptions);
        }

        parent::run();

        if($this->isShowForm) {
            echo PageSize::widget([
                'model'     => $this->filterModel,
                'attribute' => $this->attribute,
                'options'   => [
                    'data-pjax' => '0',
                ],
            ]);
        }

        if($this->is_pjax){
            Pjax::end();
        }

        echo ModelCrud::widget([
            'size' => $this->modalSize,
            'updateUrl' => ($this->updateUrl)? $this->updateUrl : Url::to(['update']),
            'createUrl' => ($this->createUrl)? $this->createUrl : Url::to(['create']),
            'updateVerb' => 'post',
            'viewUrl' => Url::to(['view']),
            'viewVerb' => 'post',
            'createVerb' => 'post',
            'modelTitle' => $this->modelTitle,
            'template' => '{view}{update}{create}',
            'modelClass' =>  $this->dataProvider->query->modelClass
        ]);
    }
开发者ID:harish-reglobbe,项目名称:Auction,代码行数:35,代码来源:GridView.php

示例5: show_params

function show_params($id, $product)
{
    ?>
 <?php 
    echo "<td><a href=\"../product?id=" . $product[$id]['product_id'] . "\">" . $product[$id]['name'] . "</a>" . "</td>";
    ?>
 <?php 
    echo "<td>" . $product[$id]['quantity'] . "</td>";
    ?>
 <?php 
    echo "<td>\$" . $product[$id]['price'] . "</td>";
    ?>
 <?php 
    echo "<td>\$" . $product[$id]['quantity'] * $product[$id]['price'] . "</td>";
    ?>
       <?php 
    Pjax::begin();
    ?>
       <td><?php 
    echo Html::a("Delete", ['../product/del?id=' . $product[$id]['product_id']], ['class' => 'btn btn-sm btn-danger', 'type' => 'button']);
    ?>
</td>
       <?php 
    Pjax::end();
    ?>
 <?php 
}
开发者ID:night1pl,项目名称:Nzi_Project,代码行数:27,代码来源:index.php

示例6: run

 public function run()
 {
     Pjax::begin(['enablePushState' => false, 'formSelector' => $this->getFormId()]);
     if (\Yii::$app->session->getFlash('yii2-params-updated')) {
         // TODO: review this custom alert code
         $closeButton = Html::button('&times;', ['data-dismiss' => 'alert', 'aria-hidden' => 'true', 'class' => 'close']);
         echo Html::tag('div', $closeButton . "Params updated successfully!", ['class' => 'alert-info alert fade in']);
     }
     /** @var \zarv1k\params\models\DynamicParam[] $models */
     $models = \zarv1k\params\models\Params::getDynamicModels();
     $form = ActiveForm::begin(['id' => $this->getFormId(), 'action' => \Yii::$app->getUrlManager()->createUrl("{$this->_moduleId}/manage")]);
     /** @var ActiveField $activeField */
     $activeField = \Yii::$container->get('yii\\widgets\\ActiveField');
     // TODO: review get from di
     foreach ($models as $model) {
         echo $form->field($model, "[{$model->owner->id}]{$model->owner->code}", ['labelOptions' => ArrayHelper::merge($activeField->labelOptions, ['label' => $model->owner->description, 'title' => $model->owner->name]), 'inputOptions' => ArrayHelper::merge($activeField->inputOptions, ['placeholder' => $model->owner->description, 'title' => $model->owner->name])]);
     }
     echo Html::submitButton($this->getSubmitContent(), $this->getSubmitOptions());
     ActiveForm::end();
     Pjax::end();
 }
开发者ID:zarv1k,项目名称:yii2-params,代码行数:21,代码来源:Params.php

示例7: run

 public function run()
 {
     $id = Html::getInputId($this->model, $this->attribute);
     $name = Html::getInputName($this->model, $this->attribute);
     Pjax::begin(['id' => $id, 'enablePushState' => false]);
     if ($this->model->{$this->attribute}) {
         echo $this->renderAddrobj($this->model->{$this->attribute});
         echo $this->renderChildren($this->model->{$this->attribute});
         // Выводит в скрытый инпут полное наименование для дальнейшего использования в гугл картах
         echo Html::hiddenInput(null, FiasHelper::toFullString($this->model->{$this->attribute}), ['class' => 'full-name']);
     } else {
         // Выводит в скрытый инпут полное наименование для дальнейшего использования в гугл картах
         echo Html::hiddenInput(null, null, ['class' => 'full-name']);
         $query = FiasAddrobj::find();
         $query->andWhere(['parentguid' => 'f6e148a1-c9d0-4141-a608-93e3bd95e6c4', 'currstatus' => 0]);
         $query->orderBy('formalname');
         $data = ArrayHelper::map($query->all(), 'aoguid', 'name');
         echo $this->renderDropDownList($data);
     }
     echo Html::activeHiddenInput($this->model, $this->attribute, ['id' => null]);
     $this->view->registerJs("\n\n            \$('#" . $id . " select').change(function(){\n                \n                \$.pjax.defaults.data = {\n                    '{$name}': \$(this).val(),\n                };\n\n                \$.pjax.reload('#" . $id . "', {\n                    type: 'POST'\n                });\n\n            });\n        ");
     Pjax::end();
 }
开发者ID:ejen,项目名称:yii2-fias,代码行数:23,代码来源:FiasSelector.php

示例8: run

 /**
  * Работаем!
  */
 public function run()
 {
     $this->registerActionButtonsAssets();
     $this->actionButtons();
     Pjax::begin(['id' => $this->id . '-pjax']);
     $this->registerPluginAssets();
     $this->renderMenu();
     $this->renderForm();
     Pjax::end();
     $this->actionButtons();
 }
开发者ID:voskobovich,项目名称:yii2-nested-sets-editor,代码行数:14,代码来源:Nestable.php

示例9: function

        ]);
//        echo 
//        GridView::widget([
//            'dataProvider' => $dataProvider,
//            'filterModel' => $searchModel,
//            'columns' => [
//                ['class' => 'yii\grid\SerialColumn'],
////            'id',
//                'name',
//                'product_group_id',
//                'code',
//                'detail:ntext',
//                // 'created_time',
//                // 'last_update',
//                // 'user_id',
//                // 'product_unit_id',
//                ['class' => 'yii\grid\ActionColumn'],
//            ],
//        ]);
        ?>
        <?php Pjax::end() ?>
    </div>
</div>
<?php
$this->registerJs('
    $("#txtProductGroupId").on("input", function() {
        var id = $(this).val().trim();        
        queryItem(id, "product-category/search", "productgroup-product_category_id", "txtProductGroupName");
    });
    ');
开发者ID:adsavin,项目名称:car,代码行数:30,代码来源:_form.php

示例10: function

            ['attribute'=>'fechacreacion_ft','format'=>['datetime',(isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime'])) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A']],

            [
                'class' => 'yii\grid\ActionColumn',
                'buttons' => [
                'update' => function ($url, $model) {
                                    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', Yii::$app->urlManager->createUrl(['solicitud/view','id' => $model->id,'edit'=>'t']), [
                                                    'title' => Yii::t('yii', 'Edit'),
                                                  ]);}

                ],
            ],
        ],
        'responsive'=>true,
        'hover'=>true,
        'condensed'=>true,
        'floatHeader'=>true,




        'panel' => [
            'heading'=>'<h3 class="panel-title"><i class="glyphicon glyphicon-th-list"></i> '.Html::encode($this->title).' </h3>',
            'type'=>'info',
            'before'=>Html::a('<i class="glyphicon glyphicon-plus"></i> Add', ['create'], ['class' => 'btn btn-success']),                                                                                                                                                          'after'=>Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset List', ['index'], ['class' => 'btn btn-info']),
            'showFooter'=>false
        ],
    ]); Pjax::end(); ?>

</div>
开发者ID:rzamarripa,项目名称:shabel,代码行数:30,代码来源:index.php

示例11: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->comments) {
         Pjax::begin();
         echo Html::beginTag($this->tag, ArrayHelper::merge(['id' => $this->id], $this->options));
         $this->renderComments($this->comments);
         echo Html::endTag($this->tag);
         echo Html::beginTag('nav', ['class' => 'comment-pagination']);
         echo LinkPager::widget(['pagination' => $this->pages, 'activePageCssClass' => 'active', 'disabledPageCssClass' => 'disabled', 'options' => ['class' => 'pagination']]);
         echo Html::endTag('nav');
         Pjax::end();
     }
 }
开发者ID:ochiem,项目名称:app-cms,代码行数:16,代码来源:BaseComment.php

示例12: run

 /**
  * (non-PHPdoc)
  * @see \yii\widgets\ActiveForm::run()
  */
 public function run()
 {
     parent::run();
     Pjax::end();
     if (!isset($this->template)) {
         $this->createDefaultTemplate();
     }
     echo $this->render('template/footer', ['formModel' => $this->formModel, 'templateController' => $this->_module->templateController, 'displayedAttributes' => $this->displayedAttributes, 'fieldNames' => $this->template->fields, 'submitTitle' => $this->submitTitle]);
     Pjax::begin(['id' => 'template-panel-pjax']);
     echo $this->templatesPanel();
     Pjax::end();
     Pjax::end();
     FlexibleFormAsset::register($this->view);
 }
开发者ID:novikas,项目名称:yii2-flexform,代码行数:18,代码来源:FlexibleForm.php

示例13: ucfirst

                 </div>
                 <div class="row">
                     <div class="col-md-4">' . $buttonsGraphLog . '</div>
                     <div class="col-md-4 text-center">' . $buttonsMenu . '</div>
                     <div class="col-md-4 text-right">' . $status . ' </div>
                 </div>
             </div>
             <div id="graph' . $vm . '" class="panel-body collapse">
             ' . $imgEth . '
             </div>
             ' . $actionMenu . '
         </div>';
 Pjax::begin(['id' => 'pjax-' . $vm]);
 echo AlertBlock::widget(['type' => AlertBlock::TYPE_ALERT, 'useSessionFlash' => true, 'delay' => false]);
 echo $result;
 Pjax::end(['id' => 'pjax-' . $vm]);
 Modal::begin(['id' => 'modalGraphEth' . $vm, 'size' => Modal::SIZE_LARGE, 'header' => '<h3>Bandwidth ' . ucfirst($vm) . '</h3>', 'toggleButton' => false]);
 echo '<div id="modalGraphEthContent' . $vm . '"></div>';
 Modal::end();
 $this->registerJs('$(document).ready(function(){
         $("#graph' . $vm . '").on("hide.bs.collapse", function(){
             $("#btnGraph' . $vm . '").html(\'<span class="glyphicon glyphicon-collapse-down"></span>  ' . Icon::show('area-chart') . '\');
         });
         $("#graph' . $vm . '").on("show.bs.collapse", function(){
             $("#btnGraph' . $vm . '").html(\'<span class="glyphicon glyphicon-collapse-up"></span>  ' . Icon::show('area-chart') . '\');
         });
         
         $("#logs' . $vm . '").on("hide.bs.collapse", function(){
             $("#btnLogs' . $vm . '").html(\'<span class="glyphicon glyphicon-collapse-down"></span>  ' . Icon::show('files-o') . '\');
         });
         $("#logs' . $vm . '").on("show.bs.collapse", function(){
开发者ID:serveurexpress,项目名称:vmpanel,代码行数:31,代码来源:index.php

示例14: function

     (with relation name) and this should be properly parsed when preparing the dataProvider to add filters.
   <div class="col-md-2">{quickSearch}</div>
*/
$layout = <<<HTML
<div class="row">
    <div class="col-md-12">{buttons}</div>
</div>
{items}
<div class="row">
    <div class="col-md-4">{pager}</div>
    <div class="col-md-4 summary">{summary}</div>
    <div class="col-md-4">{lengthPicker}</div>
</div>
HTML;
if (!isset($relation['pjax']) || $relation['pjax']) {
    $pjax = Pjax::begin(['id' => $relationName . 'Pjax', 'linkSelector' => false]);
    $fieldId = \yii\helpers\Html::getInputId($model, $relationName);
    $script = <<<JavaScript
\$('#{$relationName}Pjax').data('selectionFields', {'add': '#{$fieldId}-add', 'remove': '#{$fieldId}-remove'});
\$(document).pjax('#{$relationName}Pjax a', '#{$relationName}Pjax');
\$(document).on('pjax:beforeSend', '#{$relationName}Pjax', function(event, xhr, options) {
  var container = \$(event.target);
  xhr.setRequestHeader('X-Selection-add', \$(container.data('selectionFields').add).val());
  xhr.setRequestHeader('X-Selection-remove', \$(container.data('selectionFields').remove).val());
});
JavaScript;
    $this->registerJs($script);
}
echo GridView::widget(['id' => $relationName . 'Grid', 'dataProvider' => $relation['dataProvider'], 'filterSelector' => "#{$relationName}Grid-quickSearch", 'columns' => $relation['columns'], 'layout' => isset($relation['layout']) ? $relation['layout'] : $layout, 'buttons' => isset($relation['buttons']) ? $relation['buttons'] : []]);
$pjax !== null && Pjax::end();
开发者ID:netis-pl,项目名称:yii2-crud,代码行数:30,代码来源:_relation_widget.php

示例15:

			<?
		    	// usage without model
				echo '<label class="control-label">Дата завершения кампании</label>';
				echo DatePicker::widget([
				    'name' => 'date_end',
					'value' => $time_end,
				    'pluginOptions' => [
				        'autoclose' => true,
						'format' => 'yyyy-mm-dd',
						'startDate' => $time_end,
				        'todayHighlight' => true
				    ],
				]);
		    ?>

		<?Pjax::end();?>


		<br>
	    <?php 
echo $form->field($model, 'link')->textinput();
?>
    
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Добавить' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
开发者ID:BohdanYarema,项目名称:InternetSolutions,代码行数:31,代码来源:_form_own.php


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