Initializes the widget.
555873
public function init()
    {
        parent::init();
        if (!isset($this->options['class']) || empty($this->options['class'])) {
            Html::addCssClass($this->options, ['widget' => 'navbar', 'navbar-expand-lg', 'navbar-light', 'bg-light']);
        } else {
            Html::addCssClass($this->options, ['widget' => 'navbar']);
        }
        $navOptions = $this->options;
        $navTag = ArrayHelper::remove($navOptions, 'tag', 'nav');
        $brand = '';
        if (!isset($this->innerContainerOptions['class'])) {
            Html::addCssClass($this->innerContainerOptions, 'container');
        }
        if (!isset($this->collapseOptions['id'])) {
            $this->collapseOptions['id'] = "{$this->options['id']}-collapse";
        }
        if ($this->brandImage !== false) {
            $this->brandLabel = Html::img($this->brandImage);
        }
        if ($this->brandLabel !== false) {
            Html::addCssClass($this->brandOptions, ['widget' => 'navbar-brand']);
            if ($this->brandUrl === null) {
                $brand = Html::tag('span', $this->brandLabel, $this->brandOptions);
            } else {
                $brand = Html::a(
                    $this->brandLabel,
                    $this->brandUrl === false ? Yii::$app->homeUrl : $this->brandUrl,
                    $this->brandOptions
                );
            }
        }
        Html::addCssClass($this->collapseOptions, ['collapse' => 'collapse', 'widget' => 'navbar-collapse']);
        $collapseOptions = $this->collapseOptions;
        $collapseTag = ArrayHelper::remove($collapseOptions, 'tag', 'div');

        echo Html::beginTag($navTag, $navOptions) . "\n";
        if ($this->renderInnerContainer) {
            echo Html::beginTag('div', $this->innerContainerOptions)."\n";
        }
        echo $brand . "\n";
        echo $this->renderToggleButton() . "\n";
        echo Html::beginTag($collapseTag, $collapseOptions) . "\n";
    }
1019370
def init_widget(self):
        
        w = self.dialog
        # Listen for events
        w.setOnDismissListener(w.getId())
        w.onDismiss.connect(self.on_dismiss)
        w.setOnCancelListener(w.getId())
        w.onCancel.connect(self.on_cancel)
        super(AndroidDialog, self).init_widget()
1282394
public function init()
    {
        if ($this->isSeoEnabled() && empty($this->seoOptions)) {
            $this->seoOptions = [
                'target' => '_blank',
                'rel'    => 'noopener',
            ];
        }

        if ($this->enableIcons || $this->enableDefaultIcons) {
            $this->icons = ArrayHelper::merge(self::DEFAULT_ICONS_MAP, $this->icons);
        }
    }
177577
public function init()
    {
        parent::init();
        if ($this->useNoUiSlider) {
            if (!ArrayHelper::keyExists('start', $this->clientOptions)) {
                $this->clientOptions['start'] = $this->start;
            }

            if (!ArrayHelper::keyExists('range', $this->clientOptions)) {
                $this->clientOptions['range'] = $this->range;
            }

            if (!ArrayHelper::keyExists('step', $this->clientOptions)) {
                $this->clientOptions['step'] = $this->step;
            }

            if ($this->vertical) {
                $this->clientOptions['orientation'] = 'vertical';
            }

            if (!isset($this->sliderOptions['id'])) {
                $this->sliderOptions['id'] = $this->getId();
            }

            $this->addUpdateEvent();
            $this->registerClientScripts();
        }
    }
863260
public function init()
    {
        $this->assets = array(
            'js' => YII_DEBUG ? 'foundation/foundation.reveal.js' : 'foundation.min.js'
        );

        Html::addCssClass($this->htmlOptions, Enum::DIALOG);
        $this->setId(ArrayHelper::removeValue($this->htmlOptions, 'id', $this->getId()));
        $this->registerClientScript();
        parent::init();

        $this->htmlOptions['id'] = $this->getId();

        echo $this->renderToggleButton() . "\n";
        echo \CHtml::openTag('div', $this->htmlOptions) . "\n";
        echo $this->renderHeader() . "\n";
    }
605704
public function init()
    {
        $this->setImport(
            array(
                'auth.components.*',
                'auth.controllers.*',
                'auth.models.*',
                'auth.widgets.*',
            )
        );

        $this->registerCss();

        $this->flashKeys = array_merge(
            $this->flashKeys,
            array(
                'error' => 'error',
                'info' => 'info',
                'success' => 'success',
                'warning' => 'warning',
            )
        );

        if (isset($this->viewDir)) {
            if (strpos($this->viewDir, '.')) {
                $this->viewDir = Yii::getPathOfAlias($this->viewDir);
            }

            $this->setLayoutPath($this->viewDir . DIRECTORY_SEPARATOR . 'layouts');
            $this->setViewPath($this->viewDir);
        }
    }
1338761
public function init()
    {
        ob_start();
        ob_implicit_flush(false);

        //checks for the element id
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        
        parent::init();
    }
20963
private  void initialize() {
		this.setHideable(false);
	    this.setIcon(new ImageIcon(View.class.getResource("/resource/icon/16/094.png")));
	    this.setName(Constant.messages.getString("sites.panel.title"));
		this.setDefaultAccelerator(getView().getMenuShortcutKeyStroke(KeyEvent.VK_S, KeyEvent.SHIFT_DOWN_MASK, false));
		this.setMnemonic(Constant.messages.getChar("sites.panel.mnemonic"));

	    if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
	    	this.setSize(300,200);
	    }
		
		this.setLayout(new GridBagLayout());
		this.add(this.getPanelToolbar(), LayoutHelper.getGBC(0, 0, 1, 0, new Insets(2,2,2,2)));
		this.add(new ContextsSitesPanel(getTreeContext(), getTreeSite(), "sitesPanelScrollPane"), 
				LayoutHelper.getGBC(0, 1, 1, 1.0, 1.0, GridBagConstraints.BOTH, new Insets(2,2,2,2)));

        expandRoot();
	}
126522
public function init()
    {
        parent::init();

        if (!isset($this->containerOptions['id'])) {
            $this->containerOptions['id'] = $this->getId();
        }
        Html::addCssClass($this->containerOptions, ['widget-container' => 'chips-container']);

        if ($this->items) {
            $this->clientOptions['data'] = $this->items;
        }
        if ($this->autocompleteOptions) {
            $this->clientOptions['autocompleteOptions'] = $this->autocompleteOptions;
        }
        if ($this->placeholder) {
            $this->clientOptions['placeholder'] = $this->placeholder;
        }
        if ($this->secondaryPlaceholder) {
            $this->clientOptions['secondaryPlaceholder'] = $this->secondaryPlaceholder;
        }

        $this->registerPlugin('Chips', "#{$this->containerOptions['id']} .chips");
    }
713263
public function init()
    {
        $this->setName('users');
        $this->setLabel('Users');
        $this->setAttribute('id', 'users');
        
        
        $this->setTargetElement(
            array(
            'type' => 'hidden',
            'name' => 'user',
            )
        );
        
        $this->setCount(0)
             ->setAllowRemove(true)
             ->setAllowAdd(true)
             ->setShouldCreateTemplate(true);
    }
46934
def init_widget(self):
        
        w = self.widget
        # Selection listener
        w.setAdapter(self.adapter)
        w.setOnItemSelectedListener(w.getId())
        w.onItemSelected.connect(self.on_item_selected)
        w.onNothingSelected.connect(self.on_nothing_selected)
        super(AndroidSpinner, self).init_widget()
775839
public function init()
    {
        parent::init();

        MainAsset::register($this->getView());
        InitAsset::register($this->getView());
        TooltipAsset::register($this->getView());

        echo Html::beginTag('body', ['class' => 'page-sidebar-closed-hide-logo page-container-bg-solid page-sidebar-closed-hide-logo page-boxed page-header-fixed page-footer-fixed']);
        $this->getView()->beginBody();
    }
1195130
public function init()
    {
        parent::init();
        if ($this->route === null && Yii::$app->controller !== null) {
            $this->route = Yii::$app->controller->getRoute();
        }
        if ($this->params === null) {
            $this->params = Yii::$app->request->getQueryParams();
        }
        if ($this->treeviewCaret === null) {
            $this->treeviewCaret = FA::icon('angle-left')->pullRight();
        }
        Html::addCssClass($this->options, ['widget' => 'sidebar-menu']);
    }
1272951
public function init()
	{
		parent::init();

		if($this->buttonType=='buttonset')
		{
			if(!isset($this->htmlOptions['id']))
				$this->htmlOptions['id']=$this->getId();

			echo CHtml::openTag($this->htmlTag,$this->htmlOptions);
		}
	}
1157965
def init_widget(self):
        
        super(AndroidRelativeLayout, self).init_widget()
        d = self.declaration
        if d.gravity:
            self.set_gravity(d.gravity)
        if d.horizontal_gravity:
            self.set_horizontal_gravity(d.horizontal_gravity)
        if d.vertical_gravity:
            self.set_vertical_gravity(d.vertical_gravity)
1084090
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->resolveId();
        $route = $this->controller->getRoute();
        if ($this->stacked) {
            TbHtml::addCssClass('nav-stacked', $this->htmlOptions);
        }
        if (isset($this->scrollspy)) {
            if (is_string($this->scrollspy)) {
                $this->scrollspy = array('target' => $this->scrollspy);
            }
            $this->widget('\TbScrollspy', $this->scrollspy);
        }
        $this->items = $this->normalizeItems($this->items, $route, $hasActiveChild);
    }
1139025
public function init()
    {
        if ($this->runEvent) {
            $chain = new jsChain();
            $this->app->html->js(true, $chain->atkServerEvent(
                ['uri' => $this->getUrl()]
            ));
            $this->isRunning = true;
        }

        $this->_initialized = true;
    }