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


PHP ListView::init方法代码示例

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


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

示例1: init

 public function init()
 {
     parent::init();
     $this->options['class'] .= ' row component component-resource-list';
     $this->itemOptions['tag'] = false;
     $this->summary = false;
 }
开发者ID:luhaoz,项目名称:mcwiki,代码行数:7,代码来源:ResourceList.php

示例2: init

 public function init()
 {
     parent::init();
     $LatLngCenter = new LatLng(['lat' => $this->centerPoint['lat'], 'lng' => $this->centerPoint['lng']]);
     $this->map = new Map(['zoom' => $this->zoom, 'center' => $LatLngCenter, 'width' => '100%']);
     $this->initMarkers();
     $this->pushMarkers();
     $this->flushMap();
 }
开发者ID:elitedivision,项目名称:amos-core,代码行数:9,代码来源:MapView.php

示例3: init

 public function init()
 {
     parent::init();
     foreach (['url', 'srcNode'] as $property) {
         if ($this->pluginOptions[$property] === null) {
             throw new InvalidConfigException("The \"{$property}\" property must be set to \"pluginOptions\".");
         }
     }
     Html::addCssStyle($this->itemOptions, ['display' => 'none']);
 }
开发者ID:hdushku,项目名称:yii2-gridify-view,代码行数:10,代码来源:GridifyView.php

示例4: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     // 信息记录一般从尾页开始显示
     $pagination = $this->dataProvider->getPagination();
     $params = $pagination->params !== null ? $pagination->params : Yii::$app->getRequest()->getQueryParams();
     if (!(isset($params[$pagination->pageParam]) && is_scalar($params[$pagination->pageParam]))) {
         $pageSize = $pagination->getPageSize();
         $totalCount = $this->dataProvider->getTotalCount();
         $pagination->setPage((int) (($totalCount + $pageSize - 1) / $pageSize) - 1);
     }
 }
开发者ID:Brother-Simon,项目名称:yii2-wechat,代码行数:15,代码来源:MessageList.php

示例5: init

 public function init()
 {
     parent::init();
     $id = $this->getId();
     $this->options['id'] = $id;
     $classes = isset($this->options['class']) ? $this->options['class'] : '';
     $classes .= ' sortable';
     $this->options['class'] = trim($classes);
     $view = $this->getView();
     JuiAsset::register($view);
     $url = Url::toRoute($this->orderUrl);
     $sortOpts = array_merge($this->sortOptions, ['axis' => 'y', 'items' => '[data-key]', 'update' => new JsExpression("function(e, ui) {\n                jQuery('#{$this->id}').addClass('sorting');\n                jQuery.ajax({\n                    type: 'POST',\n                    url: '{$url}',\n                    data: {\n                        key: ui.item.data('key'),\n                        pos: ui.item.index('[data-key]')\n                    },\n                    complete: function() {\n                        jQuery('#{$this->id}').removeClass('sorting');\n                    }\n                });\n            }")]);
     $sortJson = Json::encode($sortOpts);
     $view->registerJs("jQuery('#{$id}').sortable({$sortJson});");
 }
开发者ID:infoweb-internet-solutions,项目名称:yii2-sortable-behavior,代码行数:15,代码来源:SortableListView.php

示例6: init

 public function init()
 {
     parent::init();
     $id = $this->getId();
     if (isset($this->itemOptions['class'])) {
         $this->itemOptions['class'] .= ' item';
     } else {
         $this->itemOptions['class'] = 'item';
     }
     if (isset($this->options['class'])) {
         $this->options['class'] .= ' scroll-block-view clearfix';
     } else {
         $this->options['class'] = 'scroll-block-view clearfix';
     }
     if (!isset($this->options['id'])) {
         $this->options['id'] = $id;
     }
     $this->wallOptions['container'] = new JsExpression("\$('#{$id}')");
     if ($this->columns) {
         $wallOptions['itemwidth'] = 100 / $this->columns . '%';
     }
 }
开发者ID:damiandennis,项目名称:yii2-scrollingblocks,代码行数:22,代码来源:ScrollingBlocks.php

示例7: init

 /**
  * Inits widget
  */
 public function init()
 {
     parent::init();
     $this->initSortable();
 }
开发者ID:ondiekijunior,项目名称:yii2-metronic,代码行数:8,代码来源:ListView.php

示例8: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->_date = null;
     $this->layout = "{items}\n{pager}";
 }
开发者ID:skoro,项目名称:yii2-admin-template,代码行数:9,代码来源:Timeline.php

示例9: init

 public function init()
 {
     parent::init();
     $this->pager['class'] = LinkPager::className();
 }
开发者ID:shunzi250,项目名称:lulucms2,代码行数:5,代码来源:ListView.php

示例10: init

 public function init()
 {
     parent::init();
     $this->initDefaultButtons();
 }
开发者ID:elitedivision,项目名称:amos-core,代码行数:5,代码来源:BaseListView.php

示例11: init

 public function init()
 {
     parent::init();
     $this->registerTranslations();
     $this->initOptions();
 }
开发者ID:mg-code,项目名称:yii2-infinite-list-view,代码行数:6,代码来源:ListView.php

示例12: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
 }
开发者ID:manyoubaby123,项目名称:imshop,代码行数:8,代码来源:ListView.php

示例13: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->_handler = new Intercooler($this->intercooler);
     $this->initListOptions();
 }
开发者ID:dlds,项目名称:yii2-intercooler,代码行数:9,代码来源:InfiniteList.php


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