public function init() { parent::init(); $this->options['class'] .= ' row component component-resource-list'; $this->itemOptions['tag'] = false; $this->summary = false; }
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(); }
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']); }
/** * @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); } }
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});"); }
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 . '%'; } }
/** * Inits widget */ public function init() { parent::init(); $this->initSortable(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->_date = null; $this->layout = "{items}\n{pager}"; }
public function init() { parent::init(); $this->pager['class'] = LinkPager::className(); }
public function init() { parent::init(); $this->initDefaultButtons(); }
public function init() { parent::init(); $this->registerTranslations(); $this->initOptions(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->initOptions(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->_handler = new Intercooler($this->intercooler); $this->initListOptions(); }