當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。