Widget initialization
972214
public function init()
    {
        $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));

        if ($this->uploadTemplate === null) {
            $this->uploadTemplate = "#template-upload";
        }

        if ($this->downloadTemplate === null) {
            $this->downloadTemplate = "#template-download";
        }

        if (!isset($this->htmlOptions['enctype'])) {
            $this->htmlOptions['enctype'] = 'multipart/form-data';
        }
        parent::init();
    }
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']);
    }
1142960
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->copyId();
        if (is_string($this->alerts)) {
            $colors = explode(' ', $this->alerts);
        } else {
            if (!isset($this->alerts)) {
                $colors = array(
                    TbHtml::ALERT_COLOR_SUCCESS,
                    TbHtml::ALERT_COLOR_WARNING,
                    TbHtml::ALERT_COLOR_INFO,
                    TbHtml::ALERT_COLOR_DANGER,
                ); // render all styles by default
            }
        }
        if (isset($colors)) {
            $this->alerts = array();
            foreach ($colors as $color) {
                $this->alerts[$color] = array();
            }
        }
    }
1097261
def init_widget(self):
        
        super(AndroidBarcodeView, self).init_widget()
        d = self.declaration

        #: Observe activity state changes
        app = self.get_context()
        app.observe('state', self.on_activity_lifecycle_changed)

        if d.active:
            self.set_active(d.active)
        if d.light:
            self.set_light(d.light)
        self.widget.barcodeResult.connect(self.on_barcode_result)
        if d.scanning:
            self.set_scanning(d.scanning)
701952
public function init()
    {
        if (isset($this->htmlOptions['class'])) {
            $this->htmlOptions['class'] = 'bootstrap-widget ' . $this->htmlOptions['class'];
        } else {
            $this->htmlOptions['class'] = 'bootstrap-widget';
        }

        if (isset($this->htmlContentOptions['class'])) {
            $this->htmlContentOptions['class'] = 'bootstrap-widget-content ' . $this->htmlContentOptions['class'];
        } else {
            $this->htmlContentOptions['class'] = 'bootstrap-widget-content';
        }

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

        if (isset($this->htmlHeaderOptions['class'])) {
            $this->htmlHeaderOptions['class'] = 'bootstrap-widget-header ' . $this->htmlHeaderOptions['class'];
        } else {
            $this->htmlHeaderOptions['class'] = 'bootstrap-widget-header';
        }

        $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));

        echo CHtml::openTag('div', $this->htmlOptions);

        $this->registerClientScript();
        $this->renderHeader();
        $this->renderContentBegin();
    }
474724
def init_widget(self):
        
        super(AndroidViewAnimator, self).init_widget()
        d = self.declaration
        if d.animate_first_view:
            self.set_animate_first_view(d.animate_first_view)
        if d.displayed_child:
            self.set_displayed_child(d.displayed_child)
1053611
def init_widget(self):
        
        # Create and init the client
        c = self.client = BridgedWebViewClient()
        c.setWebView(self.widget, c.getId())
        c.onLoadResource.connect(self.on_load_resource)
        c.onPageFinished.connect(self.on_page_finished)
        c.onPageStarted.connect(self.on_page_started)
        c.onReceivedError.connect(self.on_received_error)
        c.onScaleChanged.connect(self.on_scale_changed)
        c.onProgressChanged.connect(self.on_progress_changed)
        c.onReceivedTitle.connect(self.on_page_title_changed)

        super(AndroidWebView, self).init_widget()
370208
public function init()
    {
        $this->htmlOptions['id'] = TbArray::getValue('id', $this->htmlOptions, $this->getId());
        $this->pluginOptions['container'] = '#' . $this->htmlOptions['id'] . '-gallery';
        $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));
        parent::init();
    }
510197
def init_widget(self):
        
        super(AndroidFragment, self).init_widget()
        f = self.fragment
        f.setFragmentListener(f.getId())
        f.onCreateView.connect(self.on_create_view)
        f.onDestroyView.connect(self.on_destroy_view)
693624
def init_widget(self):
        
        super(UiKitSwitch, self).init_widget()

        d = self.declaration
        if d.checked:
            self.set_checked(d.checked)

        #: Watch the on property for change
        #: So apparently UISwitch is not KVO compliant...
        # self.widget.addObserver(
        #     self.get_app().view_controller,
        #     forKeyPath="on",
        #     options=UISwitch.NSKeyValueObservingOptionNew|UISwitch.NSKeyValueObservingOptionOld,
        #     context=self.widget
        #)

        #: A really ugly way to add the target
        #: would be nice if we could just pass the block pointer here :)
        self.get_app().bridge.addTarget(
            self.widget,
            forControlEvents=UISwitch.UIControlEventValueChanged,
            andCallback=self.widget.getId(),
            usingMethod="onValueChanged",
            withValues=["on"]#,"selected"]
        )

        self.widget.onValueChanged.connect(self.on_checked_changed)
395675
public function init()
    {
        if ($this->widget !== null) {
            $this->widget->init();
        }

        // ensure the widget has an id
        if ($this->widget->id === null) {
            $this->widget->id = $this->widget->getUniqueId();
        }
    }
766117
function () {
            aria.html.Template.superclass.initWidget.call(this);
            var tplDiv = ariaUtilsDom.getElementById(this._domId);
            this._subTplDiv = tplDiv;

            if (this._initCtxDone) {
                var tplCtxt = this.subTplCtxt;
                tplDiv.className = tplDiv.className + " " + this._cssClassNames;
                tplCtxt.linkToPreviousMarkup(tplDiv);
                tplCtxt.viewReady();
            }
        }
60708
public function init()
    {
        parent::init();

        Html::addCssClass($this->options, ['widget' => 'fixed-action-btn']);
        Html::addCssClass($this->buttonOptions, ['widget' => 'btn-floating']);

        if ($this->clickToToggle) {
            $this->clientOptions['hoverEnabled'] = false;
        }

        if ($this->horizontal) {
            $this->clientOptions['direction'] = 'left';
            Html::addCssClass($this->options, ['containerLayout' => 'horizontal']);
        }

        if ($this->toolbar) {
            $this->clientOptions['toolbarEnabled'] = true;
            Html::addCssClass($this->options, ['toolbar' => 'toolbar']);
        }

        $this->registerPlugin('FloatingActionButton');
    }
270979
public function init()
    {
        $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));

        TbArray::defaultValue('autocomplete', 'off', $this->htmlOptions);
        TbHtml::addCssClass('grd-white', $this->htmlOptions);

        $this->initOptions();
    }
470085
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->copyId();
        $this->htmlOptions['data-spy'] = 'affix';
        if (isset($this->offset)) {
            if (is_string($this->offset)) {
                $this->offset = array('top', $this->offset);
            }

            if (is_array($this->offset) && count($this->offset) === 2) {
                list($position, $offset) = $this->offset;
                $this->htmlOptions['data-offset-' . $position] = $offset;
            }
        }
        echo TbHtml::openTag($this->tagName, $this->htmlOptions);
    }
975647
function () {
                this.$InputElement.initWidget.call(this);

                var bindings = this._cfg.bind;
                if (bindings.value) {
                    var newValue = this._transform(bindings.value.transform, bindings.value.inside[bindings.value.to], "toWidget");
                    if (newValue != null) {
                        this._domElt.value = newValue;
                    }
                } else {
                    this.$logWarn(this.BINDING_NEEDED, [this.$class, "value"]);
                }
                this._setPlaceholder();
            }
837941
function () {
            this.$BindableWidget.initWidget.call(this);

            var bindings = this._cfg.bind;
            var isBound = false;

            if (bindings.visible) {
                var visible = this._transform(bindings.visible.transform, bindings.visible.inside[bindings.visible.to], "toWidget");
                if (visible === true) {
                    this.show();
                }
                isBound = true;
            }
            if (!isBound) {
                this.$logWarn(this.BINDING_NEEDED, [this.$class, "visible"]);
            }
        }