init the ViewModel for the wizard
@throws \Exception
967636
private function initStepViewModel() {
        #first start of Wizard
        #load template from first step
        $currentStep = $this->stepCollectionIterator->current();
        $isFirstStep = $this->getSteps()->isFirst($currentStep);
        if ($isFirstStep) {
            $firstStep = $this->getSteps()->getFirst();
            $this->viewModel->addChild($firstStep->getViewModel(), "wizardContent");
            $firstStepFormName = $firstStep->getViewModel()->getVariable("formName", false);
            if (empty($firstStepFormName))
                throw new \Exception("viewModel variable 'formName' must set for Step '".$firstStep->getName()."'");
        }
        if (!($this->prevButtonDisabled && $isFirstStep)) {
            $this->prevButtonViewModel = new ViewModel();
            $this->prevButtonViewModel->setTemplate("wizard/wizardButton");
            $this->prevButtonViewModel->setVariable("stepActionDirection", "prev");
            $this->prevButtonViewModel->setVariable("id", "prevButton");
        }

        $this->nextButtonViewModel = new ViewModel();
        $this->nextButtonViewModel->setTemplate("wizard/wizardButton");
        $this->nextButtonViewModel->setVariable("stepActionDirection", "next");
        $this->nextButtonViewModel->setVariable("id", "nextButton");

        /**
         * creates breadcrumbPath
         */
        $stepIterator = $this->getSteps()->getIterator();
        while ($stepIterator->valid()) {
            $view = $this->createBreadcrumbItems($stepIterator->current());
            $this->getSteps()->isFirst($stepIterator->current()) ? $view->setVariable("extendCssClass", "active first") : false;
            $this->getSteps()->isLast($stepIterator->current()) ? $view->setVariable("extendCssClass", "last") : false;
            $view->setVariable("breadcrumbStepName", $stepIterator->current()->getName());
            $this->viewModel->addChild($view, "breadcrumbNavigation", true);
            $stepIterator->next();
        }
        $this->resultContent = $this->viewModel;
        $this->process();
    }
1280032
public function init()
    {
        if (empty($this->data) && $this->asDropDownList === true) {
            throw new CException(Yii::t('zii', '"data" attribute cannot be blank'));
        }

        $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));
    }
268116
public function init()
    {
        if (preg_match(
                '/extendedsummary/i',
                $this->template
            ) && !empty($this->extendedSummary) && isset($this->extendedSummary['columns'])
        ) {
            $this->template .= "\n{extendedSummaryContent}";
            $this->displayExtendedSummary = true;
        }

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

        parent::init();
    }
383600
protected function initialize()
    {
        if ($this->isInitialized) {
            return;
        }
        if (!$this->dbAdapter instanceof Adapter) {
            throw new \Exception('No db adapter present');
        }
        if (!$this->hydrator instanceof HydratorInterface) {
            $this->hydrator = new ClassMethods;
        }
        if (!is_object($this->entityPrototype)) {
            throw new \Exception('No entity prototype set');
        }

        $this->isInitialized = true;
    }
94255
private function initialize(): void
    {
        if (!$this->isBootstrapLayout()) {
            return;
        }

        switch ($this->layout->cols) {
            case '2cll':
                $this->leftClass = $this->layout->bs_leftClass;
                $this->mainClass = $this->layout->bs_mainClass;
                break;

            case '2clr':
                $this->rightClass = $this->layout->bs_rightClass;
                $this->mainClass  = $this->layout->bs_mainClass;
                break;

            case '3cl':
                $this->leftClass  = $this->layout->bs_leftClass;
                $this->rightClass = $this->layout->bs_rightClass;
                $this->mainClass  = $this->layout->bs_mainClass;
                break;

            default:
                $this->useGrid = false;

                return;
        }

        $this->useGrid = true;
    }
1284188
public function init()
    {
        if ($this->isConfigConsistent()) {
            $this->setSaml(new Saml(
                Metadata::load(
                    $this->getConfig()->getSamlMetadataBaseDir() . '/' .$this->getConfig()->getIdpMetadataFile(),
                    $this->getConfig()->getSamlMetadataBaseDir() . '/' .$this->getConfig()->getSpMetadataFile()
                ),
                $this->getConfig()->getPrivateKey()
            ));
        } else {
            $metadata = new Metadata();
            $metadata->setIdentityProvider(
                $metadata->createEntityDescriptor(
                    file_get_contents(
                        $this->getConfig()->getSamlMetadataBaseDir() . '/' .$this->getConfig()->getIdpMetadataFile()
                    )
                )
            );

            $this->setSaml(new Saml($metadata, $this->getConfig()->getPrivateKey()));
        }
    }
254463
public function init()
    {
        $this->sMode = $this->property('mode');
        if (empty($this->sMode)) {
            $this->sMode = self::MODE_AJAX;
        }
    }
1027457
public function init()
    {
        $this->assets = array(
            'js' => YII_DEBUG ? 'foundation/foundation.topbar.js' : 'foundation.min.js'
        );

        Html::addCssClass($this->htmlOptions, Enum::NAV_TOPBAR);
        if ($this->fixed) {
            Html::addCssClass($this->htmlOptions, Enum::NAV_FIXED);
        }
        if ($this->sticky) {
            Html::addCssClass($this->htmlOptions, Enum::NAV_STICKY);
        }
        if ($this->containToGrid) {
            Html::addCssClass($this->htmlOptions, Enum::NAV_CONTAINED);
        }

        parent::init();
    }
409431
protected function initLayout()
    {
        if ($this->layout === null) {
            $this->layout = 'Generic';
        }

        if (is_string($this->layout) || is_array($this->layout)) {
            $this->layout = $this->factory($this->layout, ['form'=>$this], 'FormLayout');
            $this->layout = $this->add($this->layout);
        } elseif (is_object($this->layout)) {
            $this->layout->form = $this;
            $this->add($this->layout);
        } else {
            throw new Exception(['Unsupported specification of form layout. Can be array, string or object', 'layout' => $this->layout]);
        }

        // Add save button in layout
        if ($this->buttonSave) {
            $this->buttonSave = $this->layout->addButton($this->buttonSave);
            $this->buttonSave->setAttr('tabindex', 0);
            $this->buttonSave->on('click', $this->js()->form('submit'));
            $this->buttonSave->on('keypress', new jsExpression('if (event.keyCode === 13){$([name]).form("submit");}', ['name' => '#'.$this->name]));
        }
    }
2193
public function init()
    {
        parent::init();
        self::$plugin = $this;

        $this->setComponents([
            'campaignmonitor' => \clearbold\cmservice\services\CampaignMonitorService::class,
        ]);

        Craft::info(
            Craft::t(
                'cm-service',
                '{name} plugin loaded',
                ['name' => $this->name]
            ),
            __METHOD__
        );
    }
1003627
public function init()
    {
        // set name and id of view
        if (!$this->name) {
            if (!$this->id) {
                $this->id = $this->name = 'atk';
            } else {
                $this->name = $this->id;
            }
        } elseif (!$this->id) {
            $this->id = $this->name;
        }

        // initialize
        $this->_init();

        if (!$this->app) {
            $this->initDefaultApp();
        }

        if ($this->region && !$this->template && !$this->defaultTemplate && $this->owner && $this->owner->template) {
            $this->template = $this->owner->template->cloneRegion($this->region);

            $this->owner->template->del($this->region);
        } else {
            // set up template
            if (is_string($this->defaultTemplate) && is_null($this->template)) {
                $this->template = $this->app->loadTemplate($this->defaultTemplate);
            }

            if (!$this->region) {
                $this->region = 'Content';
            }
        }

        if ($this->template && !isset($this->template->app) && isset($this->app)) {
            $this->template->app = $this->app;
        }

        // add default objects
        foreach ($this->_add_later as list($object, $region)) {
            $this->add($object, $region);
        }

        $this->_add_later = [];
    }
1318773
public function initialize()
    {
        /**
         * Attaches event fired before view render
         * It allows to use $this->view->partial inside of action method before action view is being rendered
         */
        $this->eventsManager->attach('view:beforeRenderView', function($event, $view, $engineViewPath) {
            if ($view instanceof View) {
                $view->setControllerViewPath($this->router->getControllerName());
            }
        });
    }
81319
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->resolveId();
        if (isset($this->size)) {
            TbArray::defaultValue('size', $this->size, $this->htmlOptions);
        }
    }
53064
public function init() 
	{
		Yii::app()->theme = 'dora';
		$this->layout = 'front_default';
		$this->applyViewPath(__dir__, false);
	}
887107
public function init()
    {
        parent::init();
        $this->dataPath = Yii::getAlias($this->dataPath);

        if (Yii::$app instanceof \yii\web\Application) {
            $this->initPanels();
        }
    }
762282
public function init()
    {

		parent::init();
		self::$plugin = $this;

		Craft::$app->getView()->registerTwigExtension(new SuperSortTwigExtension());

    }
1285238
protected void initModel() throws Exception {
        Model.getSingleton().init(getControlOverrides());
        Model.getSingleton().getOptionsParam().setGUI(getArgs().isGUI());
    }