Constructor and Initialisation ------------------------------
8512
public function init() {

		parent::init();

		// Default Layout
		$this->layout = Yii::$app->core->defaultLayout;

		// Default Permission
		$this->crudPermission = CoreGlobal::PERM_USER;
	}
662270
public function init()
	{
		parent::init();

		self::$plugin = $this;

		$requestService = Craft::$app->getRequest();

		$this->setComponents([
            'methods' => Service::class,
        ]);

		$this->_configureTemplateVariable();

		if ($requestService->getIsCpRequest())
		{
			$this->_configureCpResources();
			$this->_configureAssetThumbnails();
			$this->_configureAssetIndexAttributes();
		}
	}
1172886
public function init() {

        parent::init();

        $this->blockService         = Yii::$app->factory->get( 'blockService' );
        $this->modelBlockService    = Yii::$app->factory->get( 'modelBlockService' );
        $this->galleryService       = Yii::$app->factory->get( 'galleryService' );
        $this->modelGalleryService  = Yii::$app->factory->get( 'modelGalleryService' );
    }
172110
public function init() {
		if (!isset($this->options['id'])) {
			$this->options['id'] = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
		}
		parent::init();
	}
252632
public function init()
    {
        parent::init();

        Html::addCssClass($this->options, ['info-box']);
        Html::addCssClass($this->iconOptions, 'info-box-icon');

        if ($this->background) {
            Html::addCssClass($this->options, 'bg-'.$this->background);
        }
    }
177577
public function init()
    {
        parent::init();
        if ($this->useNoUiSlider) {
            if (!ArrayHelper::keyExists('start', $this->clientOptions)) {
                $this->clientOptions['start'] = $this->start;
            }

            if (!ArrayHelper::keyExists('range', $this->clientOptions)) {
                $this->clientOptions['range'] = $this->range;
            }

            if (!ArrayHelper::keyExists('step', $this->clientOptions)) {
                $this->clientOptions['step'] = $this->step;
            }

            if ($this->vertical) {
                $this->clientOptions['orientation'] = 'vertical';
            }

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

            $this->addUpdateEvent();
            $this->registerClientScripts();
        }
    }
445093
public function init()
    {
        parent::init();

        $this->cache = $this->enabled ? Instance::ensure($this->cache, Cache::className()) : null;

        if ($this->cache instanceof Cache && $this->getCachedContent() === false) {
            $this->getView()->cacheStack[] = $this;
            ob_start();
            ob_implicit_flush(false);
        }
    }
773322
public function init()
    {
        parent::init();
        $that = $this;

        if ($this->owner instanceof Controller_Validator) {
            $this->owner->addHook('extraRules', array($this, 'extraRules'));

            return;  // no source, simply extend rules.
        }

        if ((
            $this->owner instanceof \Model ||
            $this->owner instanceof \Form

        ) && !$this->owner->hasMethod('is')) {
            $this->source = $this->owner; // must support set/get interface
            $this->owner->validator = $this;

            $this->source->addMethod('is', function ($m) use ($that) {
                $args = func_get_args();
                array_shift($args);

                call_user_func_array(array($that, 'is'), $args);
                $that->on('beforeSave', null, true);

                return $m;
            });
        }
    }
108874
public function init()
    {
        $this->response->disableLayout();
        $this->buildStore      = Store\Factory::getStore('Build');
        $this->projectStore    = Store\Factory::getStore('Project');
    }
1228890
public function init()
    {
        parent::init();

        if (empty($this->id)) {
            $this->id = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
        }
        if (empty($this->name)) {
            $this->name = $this->hasModel() ? Html::getInputName($this->model, $this->attribute) : $this->id;
        }
        if (empty($this->value) && $this->hasModel() && $this->model->hasAttribute($this->attribute)) {
            $this->value = $this->model->getAttribute($this->attribute);
        }

        if(!$this->autoHeightEnable){
            if(empty($this->width)){
                $this->width = '100%';
            }
            if(empty($this->height)){
                $this->height = '350';
            }
        }

        $options = [
            'id' => $this->id,
            'style' => 'width:100%;height:350px'
        ];
        $this->options = array_merge($options,$this->options);

        $jsOptions = [
            'serverUrl' => Url::to(['ueditor','type'=>'ueditor']),
            'autoHeightEnable' => $this->autoHeightEnable,
            'autoFloatEnable' => true,
            'textarea'=>$this->name
        ];
        $this->jsOptions = array_merge($jsOptions,$this->jsOptions);
    }
435162
public function init ()
	{
		parent::init();

		\Craft::setAlias(
			'simplemapimages',
			__DIR__ . '/web/assets/imgs'
		);

		$this->setComponents([
			'map' => MapService::class,
		]);

		Event::on(
			Fields::class,
			Fields::EVENT_REGISTER_FIELD_TYPES,
			[$this, 'onRegisterFieldTypes']
		);

		Event::on(
			CraftVariable::class,
			CraftVariable::EVENT_INIT,
			[$this, 'onRegisterVariable']
		);

		/** @noinspection PhpUndefinedNamespaceInspection */
		/** @noinspection PhpUndefinedClassInspection */
		if (class_exists(\markhuot\CraftQL\CraftQL::class))
		{
			Event::on(
				MapField::class,
				'craftQlGetFieldSchema',
				[new GetCraftQLSchema, 'handle']
			);
		}
	}
678606
public function init()
    {
        parent::init();

        self::$plugin = $this;

        $this->_setPluginComponents();
        $this->_setLogging();
        $this->_registerCpRoutes();
        $this->_registerPermissions();
        $this->_registerCraftEventListeners();
    }
830990
public function init()
    {
        if (
            !$this->serviceContainer->isRegistered(ServiceContainer::SERVICE_LOGGER)
            || !($this->getLogger() instanceof LoggerInterface)
        ) {
            $this->setService(ServiceContainer::SERVICE_LOGGER, new NullLogger());
        }
        $this->getControllerDispatcher()->setLogger($this->getLogger());
    }
207600
public function init()
    {
        parent::init();

        // Check we are logged in as a user who can access front end management
        if (!Permission::check("USERS_MANAGE_ACCOUNT")) {
            Security::permissionFailure();
        }

        // Set our member object
        $member = Member::currentUser();

        if ($member instanceof Member) {
            $this->member = $member;
        }
    }
386163
public function initialize()
    {
        parent::initialize();
        $this->loadComponent('FrankFoerster/Filter.Filter');
        $this->loadComponent('RequestHandler');

        $this->loadModel('Wasabi/Cms.Menus');
        $this->loadModel('Wasabi/Cms.MenuItems');
    }
109482
public function init()
    {
        parent::init();
        $this->clientOptions = false;
        if ($this->defaultWrapClass)
            Html::addCssClass($this->wrapOptions, $this->defaultWrapClass);
        if ($this->defaultClass)
            Html::addCssClass($this->options, $this->defaultClass);
    }
1199388
public function init()
    {
        $this->dataColumnClass  = DataColumn::className();
        $this->summaryOptions   = [
            'class' => 'summary well well-sm pull-left margin-bottom-10px',
        ];
        $this->layout     = '{summary}<div class="clearfix"></div>{pager}{items}{pager}';
        $this->showFooter = true;
        $this->options = ArrayHelper::merge($this->options, [
            'class' => 'grid-view table-responsive',
        ]);
        $this->pager = [
            'class' => LinkPager::className(),
        ];

        parent::init();
    }