LoginWidget ---------------------------
344052
public function renderWidget( $config = [] ) {

		$widgetHtml = $this->render( $this->template, [
			'login' => $this->login,
			'loginDisabled' => $this->loginDisabled,
			'loginMessage' => $this->loginMessage,
			'forgotPassword' => $this->forgotPassword,
			'registerDisabled' => $this->registerDisabled,
			'registerMessage' => $this->registerMessage,
			'register' => $this->register,
			'label' => $this->label,
			'fieldIcon' => $this->fieldIcon,
			'optionalFields' => $this->optionalFields,
			'actions' => $this->actions,
			'widget' => $this
		]);

		if( $this->wrap ) {

			return Html::tag( $this->wrapper, $widgetHtml, $this->options );
		}

		return $widgetHtml;
	}
807682
protected function registerWidget()
    {
        $totalUserWidget = new TotalUserWidget();
        WidgetFacade::make($totalUserWidget->identifier(), $totalUserWidget);

        $monthlyRevenueWidget = new MonthlyRevenueWidget();
        WidgetFacade::make($monthlyRevenueWidget->identifier(), $monthlyRevenueWidget);

        $totalOrderWidget = new TotalOrderWidget();
        WidgetFacade::make($totalOrderWidget->identifier(), $totalOrderWidget);

        $recentOrderWidget = new RecentOrderWidget();
        WidgetFacade::make($recentOrderWidget->identifier(), $recentOrderWidget);
    }
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();
            }
        }
649965
@Override
    protected void defineWidgets() {

        List selectOptions = getModulesFromServer();

        if (selectOptions.isEmpty()) {
            // no import modules available, display message
            addWidget(
                new CmsWidgetDialogParameter(
                    this,
                    "moduleupload",
                    PAGES[0],
                    new CmsDisplayWidget(key(Messages.GUI_MODULES_IMPORT_NOT_AVAILABLE_0))));
        } else {
            // add the file select box widget
            addWidget(new CmsWidgetDialogParameter(this, "moduleupload", PAGES[0], new CmsSelectWidget(selectOptions)));
        }
    }
401479
public void init() {
        if (initialized) {
            return;
        }
        Widget parent = inputWidget.getParent();
        while (parent != null && !parent.getClass().getName().equals("com.google.gwt.user.client.ui.Widget")) {
            helpBlock = findHelpBlock(inputWidget);
            if (helpBlock != null) {
                break;
            } else {
                parent = parent.getParent();
            }
        }
        initialized = true;
    }
888590
@Override
    protected void defineWidgets() {

        initObject();
        addWidget(new CmsWidgetDialogParameter(this, "notice", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "resources", PAGES[0], new CmsVfsFileWidget()));
    }
366226
@Override
    protected void defineWidgets() {

        initModule();
        setKeyPrefix(CmsModulesEditBase.KEY_PREFIX);
        addWidget(new CmsWidgetDialogParameter(m_module, "name", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "niceName", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "description", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "version.version", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "group", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "actionClass", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "authorName", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "authorEmail", PAGES[0], new CmsDisplayWidget()));

    }
79038
protected function registerWidget()
    {
        $totalUserWidget = new TotalUserWidget();
        WidgetFacade::make($totalUserWidget->identifier(), $totalUserWidget);

        $totalOrderWidget = new TotalOrderWidget();
        WidgetFacade::make($totalOrderWidget->identifier(), $totalOrderWidget);
    }
459625
public function actionLogin()
    {
        $password = Yii::$app->request->post('pass', false);

        // check password
        if ($password === $this->module->password || $this->hasAccess()) {
            Yii::$app->session->set(self::STYLEGUIDE_SESSION_PWNAME, $password);
            return $this->redirect(['index']);
        } elseif ($password !== false) {
            Yii::$app->session->setFlash('wrong.styleguide.password');
        }

        return $this->render('login');
    }
15410
@Override
    protected void defineWidgets() {

        // initialize the cache object to use for the dialog
        initCacheObject();

        setKeyPrefix(KEY_PREFIX);

        // widgets to display
        addWidget(new CmsWidgetDialogParameter(this, "keys", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "variations", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "maxSize", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "avgSize", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "curSize", PAGES[0], new CmsDisplayWidget()));
    }
121844
public function init()
    {
        parent::init();
        Yii::import('bootstrap.behaviors.TbWidget');
        $this->attachBehavior('tbWidget', new TbWidget);
        if (!isset($this->assetPath)) {
            $this->assetPath = Yii::getPathOfAlias('lib.select2');
        }
        if (!$this->asDropDownList && !isset($this->pluginOptions['data'])) {
            $this->pluginOptions['data'] = $data = $this->normalizeData($this->data);
        }
        if (!$this->bindPlugin) {
            $this->htmlOptions['data-plugin'] = 'select2';
            $this->htmlOptions['data-plugin-options'] = CJSON::encode($this->pluginOptions);
        }
        if (TbArray::popValue('block', $this->htmlOptions, false)) {
            TbHtml::addCssClass('input-block-level', $this->htmlOptions);
        }
    }
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);
    }
81319
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->resolveId();
        if (isset($this->size)) {
            TbArray::defaultValue('size', $this->size, $this->htmlOptions);
        }
    }
591154
@Override
    protected void defineWidgets() {

        initModule();

        addWidget(new CmsWidgetDialogParameter(m_dependency, "name", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_dependency, "version.version", PAGES[0], new CmsDisplayWidget()));

    }
687694
public function init()
	{
		parent::init();
		Yii::setPathOfAlias('gii',dirname(__FILE__));
		Yii::app()->setComponents(array(
			'errorHandler'=>array(
				'class'=>'CErrorHandler',
				'errorAction'=>$this->getId().'/default/error',
			),
			'user'=>array(
				'class'=>'CWebUser',
				'stateKeyPrefix'=>'gii',
				'loginUrl'=>Yii::app()->createUrl($this->getId().'/default/login'),
			),
			'widgetFactory' => array(
				'class'=>'CWidgetFactory',
				'widgets' => array()
			)
		), false);
		$this->generatorPaths[]='gii.generators';
		$this->controllerMap=$this->findGenerators();
	}
1274111
public void onClick(Widget widget) {

        if (widget == m_rbHue) {
            if (m_colorMode != CmsSliderBar.HUE) {
                m_colorMode = CmsSliderBar.HUE;
                m_slidermap.setColorSelectMode(CmsSliderBar.HUE);
                m_sliderbar.setColorSelectMode(CmsSliderBar.HUE);
                m_slidermap.setOverlayOpacity(100);
                m_sliderbar.setLayerOpacity(100, CmsSliderBar.COLORBAR_D);
            }

            try {
                CmsColor color = new CmsColor();
                color.setHSV(m_hue, 100, 100);
                m_slidermap.setOverlayColor("#" + color.getHex());
            } catch (Exception e) {
                // do something.
            }

            m_sliderbar.setSliderPosition(256 - (int)((new Integer(m_hue).floatValue() / 360) * 256));
            m_slidermap.setSliderPosition(
                (int)((new Integer(m_saturation).floatValue() / 100) * 256),
                256 - (int)((new Integer(m_brightness).floatValue() / 100) * 256));
        } else if (widget == m_rbSaturation) {
            if (m_colorMode != CmsSliderBar.SATURATIN) {
                m_colorMode = CmsSliderBar.SATURATIN;
                m_slidermap.setColorSelectMode(CmsSliderBar.SATURATIN);
                m_sliderbar.setColorSelectMode(CmsSliderBar.SATURATIN);
                m_slidermap.setOverlayColor("transparent");
                m_sliderbar.setLayerOpacity(100, CmsSliderBar.COLORBAR_D);
            }

            try {
                CmsColor color = new CmsColor();
                color.setHSV(m_hue, 100, m_brightness);
                m_sliderbar.setLayerColor("#" + color.getHex(), CmsSliderBar.COLORBAR_D);
            } catch (Exception e) {
                // do something.
            }

            m_slidermap.setOverlayOpacity(100 - m_saturation);

            m_sliderbar.setSliderPosition(256 - (int)((new Integer(m_saturation).floatValue() / 100) * 256));
            m_slidermap.setSliderPosition(
                (int)((new Integer(m_hue).floatValue() / 360) * 256),
                256 - (int)((new Integer(m_brightness).floatValue() / 100) * 256));
        } else if (widget == m_rbBrightness) {
            if (m_colorMode != CmsSliderBar.BRIGHTNESS) {
                m_colorMode = CmsSliderBar.BRIGHTNESS;
                m_slidermap.setColorSelectMode(CmsSliderBar.BRIGHTNESS);
                m_sliderbar.setColorSelectMode(CmsSliderBar.BRIGHTNESS);
                m_slidermap.setUnderlayColor("#000000");
                m_slidermap.setOverlayColor("transparent");
                m_sliderbar.setLayerOpacity(100, CmsSliderBar.COLORBAR_D);
            }

            try {
                CmsColor color = new CmsColor();
                color.setHSV(m_hue, m_saturation, 100);
                m_sliderbar.setLayerColor("#" + color.getHex(), CmsSliderBar.COLORBAR_D);
            } catch (Exception e) {
                // do something.
            }

            m_slidermap.setOverlayOpacity(m_brightness);

            m_sliderbar.setSliderPosition(256 - (int)((new Integer(m_brightness).floatValue() / 100) * 256));
            m_slidermap.setSliderPosition(
                (int)((new Integer(m_hue).floatValue() / 360) * 256),
                256 - (int)((new Integer(m_saturation).floatValue() / 100) * 256));
        } else if (widget == m_rbRed) {
            if (m_colorMode != CmsSliderBar.RED) {
                m_colorMode = CmsSliderBar.RED;
                m_slidermap.setColorSelectMode(CmsSliderBar.RED);
                m_sliderbar.setColorSelectMode(CmsSliderBar.RED);
            }
            m_slidermap.setOverlayOpacity(percentOf(m_red, 100));

            m_sliderbar.setSliderPosition(256 - m_red);
            m_slidermap.setSliderPosition(m_blue, 256 - m_green);
        } else if (widget == m_rbGreen) {
            if (m_colorMode != CmsSliderBar.GREEN) {
                m_colorMode = CmsSliderBar.GREEN;
                m_slidermap.setColorSelectMode(CmsSliderBar.GREEN);
                m_sliderbar.setColorSelectMode(CmsSliderBar.GREEN);
            }

            m_slidermap.setOverlayOpacity(percentOf(m_green, 100));

            m_sliderbar.setSliderPosition(256 - m_green);
            m_slidermap.setSliderPosition(m_blue, 256 - m_red);
        } else if (widget == m_rbBlue) {
            if (m_colorMode != CmsSliderBar.BLUE) {
                m_colorMode = CmsSliderBar.BLUE;
                m_slidermap.setColorSelectMode(CmsSliderBar.BLUE);
                m_sliderbar.setColorSelectMode(CmsSliderBar.BLUE);
            }

            m_slidermap.setOverlayOpacity(percentOf(m_blue, 100));

            m_sliderbar.setSliderPosition(256 - m_blue);
            m_slidermap.setSliderPosition(m_red, 256 - m_green);
        }

        if ((m_colorMode == CmsSliderBar.RED)
            || (m_colorMode == CmsSliderBar.GREEN)
            || (m_colorMode == CmsSliderBar.BLUE)) {
            int x = 0;
            int y = 0;

            if (m_colorMode == CmsSliderBar.RED) {
                x = m_blue;
                y = m_green;
            }

            if (m_colorMode == CmsSliderBar.GREEN) {
                x = m_blue;
                y = m_red;
            }

            if (m_colorMode == CmsSliderBar.BLUE) {
                x = m_red;
                y = m_green;
            }

            int horzPer = (int)((new Float(x).floatValue() / 256) * 100);
            int vertPer = (int)((new Float(y).floatValue() / 256) * 100);
            int horzPerRev = (int)(((256 - new Float(x).floatValue()) / 256) * 100);
            int vertPerRev = (int)(((256 - new Float(y).floatValue()) / 256) * 100);

            if (vertPerRev > horzPerRev) {
                m_sliderbar.setLayerOpacity(horzPerRev, CmsSliderBar.COLORBAR_D);
            } else {
                m_sliderbar.setLayerOpacity(vertPerRev, CmsSliderBar.COLORBAR_D);
            }
            if (vertPerRev > horzPer) {
                m_sliderbar.setLayerOpacity(horzPer, CmsSliderBar.COLORBAR_C);
            } else {
                m_sliderbar.setLayerOpacity(vertPerRev, CmsSliderBar.COLORBAR_C);
            }
            if (vertPer > horzPer) {
                m_sliderbar.setLayerOpacity(horzPer, CmsSliderBar.COLORBAR_B);
            } else {
                m_sliderbar.setLayerOpacity(vertPer, CmsSliderBar.COLORBAR_B);
            }
            if (vertPer > horzPerRev) {
                m_sliderbar.setLayerOpacity(horzPerRev, CmsSliderBar.COLORBAR_A);
            } else {
                m_sliderbar.setLayerOpacity(vertPer, CmsSliderBar.COLORBAR_A);
            }
        }
    }
528419
@Override
    protected void defineWidgets() {

        // initialize the project object to use for the dialog
        initProjectObject();

        setKeyPrefix(KEY_PREFIX);

        // widgets to display
        if (isNewProject()) {
            addWidget(new CmsWidgetDialogParameter(this, "name", PAGES[0], new CmsInputWidget()));
        } else {
            addWidget(new CmsWidgetDialogParameter(this, "name", PAGES[0], new CmsDisplayWidget()));
        }
        addWidget(new CmsWidgetDialogParameter(m_project, "description", "", PAGES[0], new CmsTextareaWidget(), 0, 1));
        addWidget(new CmsWidgetDialogParameter(this, "managerGroup", PAGES[0], new CmsGroupWidget(null, null)));
        addWidget(new CmsWidgetDialogParameter(this, "userGroup", PAGES[0], new CmsGroupWidget(null, null)));
        if (isNewProject()) {
            int ous = 1;
            try {
                ous = OpenCms.getRoleManager().getOrgUnitsForRole(getCms(), CmsRole.PROJECT_MANAGER, true).size();
            } catch (CmsException e) {
                // should never happen
            }
            if (ous < 2) {
                addWidget(new CmsWidgetDialogParameter(this, "assignedOu", PAGES[0], new CmsDisplayWidget()));
            } else {
                addWidget(
                    new CmsWidgetDialogParameter(
                        this,
                        "oufqn",
                        PAGES[0],
                        new CmsOrgUnitWidget(CmsRole.PROJECT_MANAGER)));
            }
        } else {
            addWidget(new CmsWidgetDialogParameter(this, "assignedOu", PAGES[0], new CmsDisplayWidget()));
        }
        addWidget(new CmsWidgetDialogParameter(m_project, "deleteAfterPublishing", PAGES[0], new CmsCheckboxWidget()));
        addWidget(
            new CmsWidgetDialogParameter(this, "resources", PAGES[0], new CmsVfsFileWidget(false, "", false, false)));
    }