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


PHP AttributeGroup::unsetAttributes方法代码示例

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


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

示例1: changeGroupFilter

                                        $.fn.yiiGridView.update('attribute-group-grid');
                                    }
                                    else {
                                        console.log(data.data);
                                    }
                                }
                            });
                        }
                    });
                });

                function changeGroupFilter() {
                    if (!$('#attribute-group-grid').find('a.editable-open')[0]) {
                        $("#Attribute_group_id").val($.fn.yiiGridView.getSelection('attribute-group-grid')).trigger("change");
                    }
                }
            </script>
        </fieldset>
        <?php 
$attributeGroup = new AttributeGroup('search');
$attributeGroup->unsetAttributes();
$this->widget('yupe\\widgets\\CustomGridView', ['id' => 'attribute-group-grid', 'type' => 'condensed', 'dataProvider' => $attributeGroup->search(), 'template' => "{items}\n{multiaction}", 'hideHeader' => true, 'selectableRows' => 1, 'sortableRows' => true, 'sortableAjaxSave' => true, 'sortableAttribute' => 'position', 'sortableAction' => '/store/attributeBackend/sortable', 'actionsButtons' => ['clear' => CHtml::link(Yii::t("StoreModule.store", "Without a group"), '#', ['id' => 'clear-attribute-group-filter', 'class' => 'btn btn-sm btn-default']), 'add' => CHtml::link(Yii::t('YupeModule.yupe', 'Add'), '#', ['id' => 'add-attribute-group', 'class' => 'btn btn-sm btn-success pull-right'])], 'afterAjaxUpdate' => 'js:function(id, data){ changeGroupFilter(); }', 'columns' => [['name' => 'name', 'class' => 'bootstrap.widgets.TbEditableColumn', 'headerHtmlOptions' => ['style' => 'width:500px'], 'editable' => ['type' => 'text', 'url' => ['/store/attributeBackend/inlineEditGroup'], 'title' => Yii::t('StoreModule.store', 'Enter {field}', ['{field}' => mb_strtolower($attributeGroup->getAttributeLabel('name'))]), 'params' => [Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken], 'placement' => 'right']]]]);
?>
    </div>
    <div class="col-sm-8">
        <?php 
$this->widget('yupe\\widgets\\CustomGridView', ['id' => 'attribute-grid', 'type' => 'condensed', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => [['name' => 'group_id', 'value' => '$data->getGroupTitle()', 'filter' => CHtml::activeDropDownList($model, 'group_id', AttributeGroup::model()->getFormattedList(), ['empty' => '', 'class' => 'form-control'])], ['name' => 'name', 'type' => 'raw', 'value' => 'CHtml::link($data->name, array("/store/attributeBackend/update", "id" => $data->id))'], ['name' => 'title', 'type' => 'raw', 'value' => 'CHtml::link($data->title, array("/store/attributeBackend/update", "id" => $data->id))'], ['name' => 'type', 'type' => 'text', 'value' => '$data->getTypeTitle($data->type)', 'filter' => $model->getTypesList()], ['class' => 'yupe\\widgets\\CustomButtonColumn']]]);
?>
    </div>
</div>
开发者ID:alextravin,项目名称:yupe,代码行数:30,代码来源:index.php

示例2: actionIndex

 /**
  *
  */
 public function actionIndex()
 {
     $model = new Attribute('search');
     $model->unsetAttributes();
     $attributeGroup = new AttributeGroup('search');
     $attributeGroup->unsetAttributes();
     if (isset($_GET['Attribute'])) {
         $model->setAttributes($_GET['Attribute']);
     }
     $this->render('index', ['model' => $model, 'attributeGroup' => $attributeGroup]);
 }
开发者ID:yupe,项目名称:yupe,代码行数:14,代码来源:AttributeBackendController.php


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