Initializes the widget
766716
public function init()
    {
        parent::init();

        if ($this->useSessionFlash) {
            $session = Yii::$app->getSession();
            $flashes = $session->getAllFlashes();

            foreach ($flashes as $type => $data) {
                $data = (array) $data;
                foreach ($data as $message) {
                    $this->options['type'] = $type;
                    $this->options['title'] = $message;
                }
                $session->removeFlash($type);
            }
        } else {
            if (!$this->hasTitle()) {
                throw new InvalidConfigException("The 'title' option is required.");
            }
        }
    }
887107
public function init()
    {
        parent::init();
        $this->dataPath = Yii::getAlias($this->dataPath);

        if (Yii::$app instanceof \yii\web\Application) {
            $this->initPanels();
        }
    }
1044956
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->copyId();
        if ($this->stateful) {
            echo TbHtml::statefulFormTb($this->layout, $this->action, $this->method, $this->htmlOptions);
        } else {
            echo TbHtml::beginFormTb($this->layout, $this->action, $this->method, $this->htmlOptions);
        }
    }
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);
		}
	}
1287001
public function init()
    {
        parent::init();
        Html::addCssClass($this->options, ['widget' => 'collapsible']);

        if ($this->isPopoutStyle) {
            Html::addCssClass($this->options, ['popout' => 'popout']);
        }

        if ($this->type == self::TYPE_EXPANDABLE) {
            $this->clientOptions['accordion'] = false;
        }

        $this->registerPlugin('Collapsible');
    }
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);
        }
    }
441404
public function init()
    {
        if ($this->submenuOptions === null) {
            $this->submenuOptions = $this->options;
            unset($this->submenuOptions['id']);
        }
        parent::init();

        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getUniqueId('dropdown_');
        }
        Html::addCssClass($this->options, ['widget' => 'dropdown-content']);

        $this->registerPlugin('Dropdown', '.dropdown-trigger');
    }
996014
public function init()
    {
        parent::init();
        $this->clientOptions = false;
        Html::addCssClass($this->options, $this->size);
        Html::addCssClass($this->options, 'material-icons');
    }
134151
public function init()
    {
        $this->assets = array(
            'js' => YII_DEBUG ? 'foundation/foundation.orbit.js' : 'foundation.min.js'
        );

        Html::addCssClass($this->htmlOptions, Enum::ORBIT_WRAPPER);
        $this->setId(ArrayHelper::removeValue($this->htmlOptions, 'id', $this->getId()));
        $this->registerClientScript();
        parent::init();
    }
927090
private void initialize() {
		this.setLayout(new CardLayout());
		this.setName(getContextIndex() + ": " + PANEL_NAME);
		this.setLayout(new GridBagLayout());
		this.setBorder(new EmptyBorder(2, 2, 2, 2));

		this.add(new JLabel("<html><p>" + Constant.messages.getString("forceduser.panel.label.description")
				+ "</p></html>"), LayoutHelper.getGBC(0, 0, 1, 1.0D));

		// Forced User combo box
		this.add(getUsersComboBox(), LayoutHelper.getGBC(0, 2, 1, 1.0D, new Insets(5, 0, 0, 0)));

		// Padding
		this.add(new JLabel(), LayoutHelper.getGBC(0, 99, 1, 1.0D, 1.0D));
	}
824293
public function init()
    {
        $this->fillFromConfig([
            'buttons',
            'search',
        ]);

        /*
         * Prepare the search widget (optional)
         */
        if (isset($this->search)) {

            if (is_string($this->search)) {
                $searchConfig = $this->makeConfig(['partial' => $this->search]);
            }
            else {
                $searchConfig = $this->makeConfig($this->search);
            }

            $searchConfig->alias = $this->alias . 'Search';
            $this->searchWidget = $this->makeWidget('Backend\Widgets\Search', $searchConfig);
            $this->searchWidget->bindToController();
        }
    }
119982
public function init()
    {
        $this->typeTemplate = strtr($this->typeTemplate, array('{class}' => $this->chartCssClass));
        parent::init();
    }
366909
public function initialize()
    {
        parent::initialize();

        //Sets the theme from configuration
        if (getConfig('default.theme')) {
            $this->setTheme(getConfig('default.theme'));
        }

        //Loads helpers
        $this->loadHelper('Html', ['className' => 'MeTools.Html']);
        $this->loadHelper('MeTools.Dropdown');
        $this->loadHelper('MeTools.Form');
        $this->loadHelper('MeTools.Library');
        $this->loadHelper('MeTools.Paginator');
        $this->loadHelper('Assets.Asset');
        $this->loadHelper('Thumber.Thumb');
        $this->loadHelper('WyriHaximus/MinifyHtml.MinifyHtml');
    }
1238325
public function init()
    {
        parent::init();

        if (isset($this->itemsCssClass)) {
            TbHtml::addCssClass($this->itemsCssClass, $this->htmlOptions);
        }
    }
675858
public function init()
    {
        parent::init();

        Html::addCssClass($this->carouselOptions, ['plugin' => 'carousel']);
        if ($this->fullWidth) {
            Html::addCssClass($this->carouselOptions, ['fullwidth' => 'carousel-slider']);
            $this->clientOptions['fullWidth'] = true;
        }

        $this->clientOptions['noWrap'] = $this->noWrap;
        $this->clientOptions['indicators'] = $this->showIndicators;
        $this->clientOptions['duration'] = $this->duration;
        $this->clientOptions['dist'] = $this->perspectiveZoom;
        $this->clientOptions['shift'] = $this->centerSpacing;
        $this->clientOptions['padding'] = $this->padding;
        $this->clientOptions['numVisible'] = $this->visibleItems;

        $this->registerPlugin('Carousel', '.carousel');
    }
477092
public function init()
    {
        parent::init();

        echo Html::beginTag('div', ['class' => 'portlet light', 'id' => $this->id]);
            echo Html::beginTag('div', ['class' => 'portlet-title tabbable-line']);
                echo Html::beginTag('div', ['class' => 'caption']);
                    echo $this->renderCaption();
                echo Html::endTag('div');

                echo $this->renderButtons();

            echo Html::endTag('div');

            echo Html::beginTag('div', ['class' => 'portlet-body']);
    }
641283
public function init()
  {
    if(!Yii::$app->user->isGuest)
    {
      if(Yii::$app->user->identity->isAdmin && $this->enableAdmin){
        Html::addCssClass($this->htmlOptions,'widgetadmin');      
        Draggable::begin();
      }
    }
    ob_start();
    ob_implicit_flush(false);
    
    $this->htmlOptions['id']=$this->getId();

    echo Html::beginTag($this->tagName,$this->htmlOptions)."\n";

    if(!Yii::$app->user->isGuest)
    {
      if(Yii::$app->user->identity->isAdmin && $this->enableAdmin){
        $this->renderToolbar();
      }
    }

    $this->renderDecoration();
    echo "<div class=\"{$this->contentCssClass}\">\n";

    $this->_beginTag=ob_get_contents();

    ob_clean();
    if(!Yii::$app->user->isGuest)
    {
      if(Yii::$app->user->identity->isAdmin && $this->enableAdmin){
        Draggable::end();
      }
    }
  }