Initializes backend options

@return $this
335363
protected function initBackend()
    {
        $this->backendList = array();
        $this->balancedBackendList = array();

        foreach ($this->getConfigArrayOption('backend', array()) as $backendName => $option) {
            if (!isset($option['ip']) || !isset($option['port'])) {
                continue;
            }

            $this->backendList[$backendName] = array($option['ip'], $option['port']);
            if (!empty($option['balanced'])) {
                $this->balancedBackendList[] = $backendName;
            }

            if (!empty($option['admin'])) {
                $this->adminBackend = $backendName;
            }
        }

        if ($this->adminBackend === null) {
            $this->adminBackend = key($this->backendList);
        }

        return $this;
    }
1237746
public function init()
    {
        $serviceFactory = new \OAuth\ServiceFactory();
        $serviceFactory->setHttpClient(new CurlClient());
        $this->service = $serviceFactory->createService(
            $this->getServiceName(), $this->credentials, $this->sessionStorage, $this->scopes
        );

        return $this;
    }
844766
protected function initialize()
    {
        parent::initialize();

        // unless already configured, set default options to include exceptions
        $options = $this->defaults->getOptions() ?: [];

        foreach ($this->soapOptionDefaults as $option => $value) {

            if ( ! array_key_exists($option, $options)) {

                $options[ $option ] = $value;
            }
        }

        $this->defaults->setOptions($options);
    }
996328
public function init()
    {
        if ($classes = ArrayHelper::getValue($this->options, 'class')) {
            $this->options = ArrayHelper::merge($this->options, [
                'class' => $classes.' sx-form-admin',
            ]);
        } else {
            $this->options = ArrayHelper::merge($this->options, [
                'class' => 'sx-form-admin',
            ]);
        }

        if ($this->usePjax) {
            Pjax::begin(ArrayHelper::merge([
                'id'              => 'sx-pjax-form-'.$this->id,
                'enablePushState' => false,
            ], $this->pjaxOptions));

            $this->options = ArrayHelper::merge($this->options, [
                'data-pjax' => true,
            ]);

            echo \skeeks\cms\modules\admin\widgets\Alert::widget();
        }

        parent::init();
    }
122899
public function init()
    {
        // Works only on backend site
        if (!OL_ZEUS_ISADMIN) {
            return;
        }

        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Check
        if (empty($configs)) {
            return;
        }

        // Iterate on configs
        foreach ($configs as $key => $props) {
            $props = !is_array($props) ? [$props] : $props;

            // Add admin theme
            $this->addAdminTheme($key, $props);
        }
    }
160149
public function Backend() {
		$backends = array_keys($this->config()->get('allowed_backends', Config::FIRST_SET));
		switch(sizeof($backends)) {
		// Nothing allowed, use the default value "DeploymentBackend"
		case 0:
			$backend = "DeploymentBackend";
			break;

		// Only 1 thing allowed, use that
		case 1:
			$backend = $backends[0];
			break;

		// Multiple choices, use our choice if it's legal, otherwise default to the first item on the list
		default:
			$backend = $this->BackendIdentifier;
			if(!in_array($backend, $backends)) $backend = $backends[0];
		}

		return Injector::inst()->get($backend);
	}
1188440
private function initOptions()
    {
        $this->optionsResolver->setDefaults([
            'entity' => null,
            'qb' => null,
            'alias' => null,
            'em' => null,
            'useOutputWalkers' => null,
        ]);

        $this->optionsResolver->setAllowedTypes('entity', ['string', 'null']);
        $this->optionsResolver->setAllowedTypes('qb', ['\Doctrine\ORM\QueryBuilder', 'null']);
        $this->optionsResolver->setAllowedTypes('alias', ['null', 'string']);
        $this->optionsResolver->setAllowedTypes('em', ['null', 'string']);
        $this->optionsResolver->setAllowedTypes('useOutputWalkers', ['null', 'bool']);

        $entityNormalizer = function(Options $options, $value) {
            if (is_null($options['qb']) && is_null($value)) {
                throw new InvalidOptionsException('You must specify at least one option, "qb" or "entity".');
            }

            return $value;
        };

        $this->optionsResolver->setNormalizer('entity', $entityNormalizer);
    }
1255311
private function init()
    {
        $this->curl = curl_init();
        $this->setUserAgent(self::USER_AGENT);
        $this->setOpt(CURLINFO_HEADER_OUT, true);
        $this->setOpt(CURLOPT_HEADER, false);
        $this->setOpt(CURLOPT_RETURNTRANSFER, true);
        $this->setOpt(CURLOPT_HEADERFUNCTION, array($this, 'addResponseHeaderLine'));
        return $this;
    }
163366
public function initialize()
    {
        // attributes
        $this->setName('user_role');
        $this->setPhpName('UserRole');
        $this->setClassname('Slashworks\\BackendBundle\\Model\\UserRole');
        $this->setPackage('src.Slashworks.BackendBundle.Model');
        $this->setUseIdGenerator(false);
        // columns
        $this->addForeignPrimaryKey('user_id', 'UserId', 'INTEGER' , 'user', 'id', true, null, null);
        $this->addForeignPrimaryKey('role_id', 'RoleId', 'INTEGER' , 'role', 'id', true, null, null);
        // validators
    }
1275877
public function initOptions()
    {
        $options = array();
        foreach (array('matcher', 'sorter', 'updater', 'highlighter') as $fn) {
            if ($this->$fn !== null) {
                if ($this->$fn instanceof CJavaScriptExpression) {
                    $options[$fn] = $this->$fn;
                } else {
                    $options[$fn] = new CJavaScriptExpression($this->$fn);
                }
            }
        }

        $this->pluginOptions = TbArray::merge(
            array(
                'source' => $this->source,
                'items' => $this->items,
                'minLength' => $this->minLength
            ),
            $options
        );
    }
124453
public function init()
    {
        if( empty($this->options['id'])){
            $this->options['id']='batch_delete';
        }
        if( empty($this->options['class'])){
            $this->options['class']='btn btn-success';
        }
    }
923926
public function initializeObject()
    {
        /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
        $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
        $querySettings->setRespectStoragePage(false);
        $this->setDefaultQuerySettings($querySettings);
        $this->backendLayoutView = GeneralUtility::makeInstance(\MASK\Mask\Backend\BackendLayoutView::class);
    }
905455
protected function initOptions()
    {
        $this->options = array_merge([
            'class' => 'ibox float-e-margins',
            'tabindex' => -1,
        ], $this->options);

        Html::addCssClass($this->bodyOptions, 'ibox-content');

    }
511285
private function setUp(): self
    {
        fn::allowCors();
        fn::allowHeader();
        $this->configApp();
        $this->configRoutes();

        return $this;
    }
1126774
private function initOptions()
    {
        $this->optionsResolver->setDefaults([
            'criteria' => null,
            'collection' => [],
        ]);

        $this->optionsResolver->setAllowedTypes('collection', [
            'array',
            Traversable::class,
            Selectable::class
        ]);

        $this->optionsResolver->setAllowedTypes('criteria', ['null', Criteria::class]);
    }
217047
def _set_render_options(cls, options, backend=None):
        
        if backend:
            backend = backend.split(':')[0]
        else:
            backend = Store.current_backend

        cls.set_backend(backend)
        if 'widgets' in options:
            options['widget_mode'] = options['widgets']
        renderer = Store.renderers[backend]
        render_options = {k: options[k] for k in cls.render_params if k in options}
        renderer.param.set_param(**render_options)
111537
protected function _initItems()
    {
        parent::_initItems();

        foreach ($this->_items as $item) {
            $applyValue = $item->getLabel();
            if (($valuePos = array_search($applyValue, $this->currentFilterValue)) !== false) {
                $item->setIsSelected(true);
                $applyValue = $this->currentFilterValue;
                unset($applyValue[$valuePos]);
            } else {
                $applyValue = array_merge($this->currentFilterValue, [$applyValue]);
            }

            $item->setApplyFilterValue(array_values($applyValue));
        }

        return $this;
    }