Initialize the component

@throws \yii\base\InvalidConfigException
550321
public function init()
    {
        parent::init();

        $this->model = new $this->modelClass;

        if (is_string($this->cache)) {
            $this->cache = Yii::$app->get($this->cache, false);
        }
        if (is_string($this->frontCache)) {
            $this->frontCache = Yii::$app->get($this->frontCache, false);
        }
    }
81781
public function init()
    {
        parent::init();
        
        $lang = Yii::$app->adminuser->getInterfaceLanguage();
        
        $this->js = [
            'angular-locale_'.$lang.'.js',
        ];
    }
708916
public function init()
    {
        parent::init();

        if (empty($this->id)) {
            $this->id = $this->getId();
        }

        if ($this->modelClass == null) {
            throw new InvalidConfigException('Param "modelClass" must be contain model name');
        }

        if (null == $this->behaviorName) {
            throw new InvalidConfigException("No 'behaviorName' supplied on action initialization.");
        }

        if (null == $this->advancedUpdateRoute && ($controller = Yii::$app->controller)) {
            $this->advancedUpdateRoute = "{$controller->id}/update";
        }

        if ($this->formFieldsCallable == null) {
            $this->formFieldsCallable = function ($form, $model) {
                /** @var ActiveForm $form */
                echo $form->field($model, $this->nameAttribute);
            };
        }

        /** @var ActiveRecord|TreeInterface $model */
        $model = $this->modelClass;

        /** @var ActiveRecord[]|TreeInterface[] $rootNodes */
        $rootNodes = $model::find()->roots()->all();

        if (!empty($rootNodes[0])) {
            /** @var ActiveRecord|TreeInterface $items */
            $items = $rootNodes[0]->populateTree();
            $this->_items = $this->prepareItems($items);
        }
    }
1199526
public function init() {

		parent::init();

		// Foxslider Alias
		Yii::setAlias( 'foxslider', dirname( dirname( dirname( __DIR__ ) ) ) );

		// Register components and objects
		$this->registerComponents();
	}
908837
public function init()
    {
        parent::init();

        if ($this->connectorRoute === null) {
            throw new InvalidConfigException('Connector route must be specified.');
        }

        $this->settings['url'] = Url::toRoute($this->connectorRoute);

        if (!isset($this->settings['lang'])) {
            $this->settings['lang'] = Yii::$app->language;
        } elseif ($this->settings['lang'] === false) {
            unset($this->settings['lang']);
        }

        $this->settings['customData'] = [
            Yii::$app->request->csrfParam => Yii::$app->request->csrfToken,
        ];
    }
1058701
public function init(): void
    {
        if (!in_array($this->layout, [self::LAYOUT_DEFAULT, self::LAYOUT_HORIZONTAL, self::LAYOUT_INLINE])) {
            throw new InvalidConfigException('Invalid layout type: ' . $this->layout);
        }

        if ($this->layout === 'inline') {
            Html::addCssClass($this->options, 'form-inline');
        }
        parent::init();
    }
67879
public function init()
	{
        Yii::app()->language = Cii::setApplicationLanguage();
        parent::init();
		if (isset(Yii::app()->theme) && isset(Yii::app()->theme->name))
			$this->basePath = Yii::getPathOfAlias('base.themes.' . Yii::app()->theme->name . '.messages');
        else if (isset(Yii::app()->controller->module->id))
            $this->basePath = Yii::getPathOfAlias('application.modules.' . Yii::app()->controller->module->id);
		else
			$this->basePath = Yii::getPathOfAlias('application.modules.install');
	}
1199065
public function init()
    {
        if ($this->model === NULL && ($this->entity === NULL || $this->entityId === NULL))
        {
            throw new InvalidConfigException(Yii::t('app', 'The "model" property or "entity" and "entityId" values must be set.'));
        }
        $this->registerAssets();
    }
1066871
public function init($component, $options = array()) {
		parent::init($component, $options);
		$this->auth = Yii::app()->loid->load();
	}
30943
public function init()
    {
        if ($this->model === null) {
            throw new InvalidConfigException('Please specify the "model" property.');
        }

        $this->dataProvider = new ArrayDataProvider(['allModels' => [$this->model]]);
        parent::init();
    }
271145
function init(): void {
    $helpers = [
      'app' => \Yii::$app,
      'format' => new helpers\Format,
      'html' => new helpers\Html,
      'i18n' => new helpers\I18N,
      'url' => new helpers\Url
    ];

    $options = [
      'charset' => \Yii::$app->charset,
      'entity_flags' => ENT_QUOTES | ENT_SUBSTITUTE,
      'escape' => [Html::class, 'encode'],
      'helpers' => ArrayHelper::merge($helpers, $this->helpers),
      'partials_loader' => new Loader(['viewRenderer' => $this]),
      'strict_callables' => true
    ];

    if ($this->enableCaching) {
      /** @var \yii\caching\Cache $cache */
      $cache = Instance::ensure($this->cache, \yii\caching\Cache::class);
      $this->cache = $cache;
      $options['cache'] = new Cache(['viewRenderer' => $this]);
    }

    if ($this->enableLogging) $options['logger'] = new Logger;
    $this->engine = new \Mustache_Engine($options);

    parent::init();
    $this->helpers = [];
  }
166110
public function init() {
        parent::init();

        if (empty($this->attachementClass)) {
            throw new \yii\base\Exception("attachementClass is required!");
        }

        $this->_organizer = Yii::$app->czaHelper->folderOrganizer;
        Yii::$app->response->format = Response::FORMAT_JSON;

        $this->tempPath = Yii::getAlias($this->tempPath);
        if (!is_dir($this->tempPath)) {
            FileHelper::createDirectory($this->tempPath, $this->dirMode, true);
        }
    }
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']);
    }
576423
public function init() {

		parent::init();

		// Model service provided by controller
		$this->modelService	= $this->controller->modelService;

		// Configure parentType
		if( $this->parent ) {

			$this->parentType = $this->modelService->getParentType();
		}

		$this->typed = $this->modelService->isTyped();

		// Configure type
		if( $this->typed ) {

			$type		= Yii::$app->request->get( $this->typeParam, null );
			$this->type	= isset( $type ) ? $type : $this->type;
		}

		// Mapper or Resource Type
		$modelType			= Yii::$app->request->get( 'model-type', null );
		$modelType			= isset( $modelType ) ? $modelType : Yii::$app->request->post( 'model-type', null );
		$modelType			= isset( $modelType ) ? $modelType : $this->modelType;
		$this->modelType	= isset( $modelType ) ? $modelType : CoreGlobal::TYPE_DEFAULT;
	}
337841
public function init() {

		parent::init();

		// Views
		$this->setViewPath( '@cmsgears/module-community/admin/views/group' );

		// Config
		$this->reviews		= true;
		$this->prettyReview	= false;

		// Services
		$this->templateService		= Yii::$app->factory->get( 'templateService' );
		$this->modelContentService	= Yii::$app->factory->get( 'modelContentService' );
	}
421406
public function init ()
		{
			if (!in_array($this->layout, [ 'default', 'horizontal', 'inline' ]))
				throw new InvalidConfigException('Invalid layout type: ' . $this->layout);

			if ($this->layout !== 'default')
				Html::addCssClass($this->options, 'form-' . $this->layout);

			if ($this->name)
				$this->options[ 'name' ] = $this->name;

			parent::init();
		}
958072
public function init()
    {
        parent::init();
        if (!$this->has(static::CART_COMPONENT_ID)) {
            $this->set(static::CART_COMPONENT_ID, array_merge([
                'class' => 'hiqdev\yii2\cart\ShoppingCart',
            ], $this->shoppingCartOptions));
        }
        $this->get(static::CART_COMPONENT_ID)->module = $this;
        $this->registerTranslations();
    }