Initialize object.

@param AdminStore $admin_store An instance of AdminStore.
12966
public static function init(AdminStore $admin_store) {
		self::$admin_store = $admin_store;
		self::$sql = $admin_store->store;
		self::$logger = $admin_store->logger;
	}
1347376
protected function init()
    {
        $this->addToStoreList('sorting', SortingListStore::class);
        $this->addToStoreList('category', ListByCategoryStore::class);
        $this->addToStoreList('brand', ListByBrandStore::class);
        $this->addToStoreList('active', ActiveListStore::class);
        $this->addToStoreList('promo_block', ListByPromoBlockStore::class);
    }
1161766
private function initStores($storeIds)
    {
        if (!is_array($storeIds)) {
            $storeIds = explode(',', $storeIds);
        }

        $availableStores = $this->storeManager->getStores(true);

        foreach ($availableStores as $availableStore) {
            if (in_array($availableStore->getId(), $storeIds)) {
                $this->storeIds[$availableStore->getId()] = $availableStore;
            }
        }

        return $this;
    }
211679
protected function init() {
        $this->data['objecttable'] = competency_framework::TABLE;
        $this->data['crud'] = 'c';
        $this->data['edulevel'] = self::LEVEL_OTHER;
    }
542380
public function init() {

		parent::init();

		// Permission
		$this->crudPermission = FormsGlobal::PERM_FORM_ADMIN;

		// Services
		$this->modelService	= Yii::$app->factory->get( 'formService' );
	}
365087
private function setupProps($amntStore, $storeId)
    {
        $this->uiIsWalletUsed = true;
        $amntWallet = $this->hlpWalletCur->storeToWallet($amntStore, $storeId);
        $this->uiAmountStore = $this->hlpFormat->toNumber(round($amntStore, 2));
        $this->uiAmountWallet = $this->hlpFormat->toNumber(round($amntWallet, 2));
        $this->uiCurrencyWallet = $this->hlpWalletCur->getWalletCurrency();
        $this->uiCurrencyStore = $this->hlpWalletCur->getStoreCurrency($storeId);
    }
739485
def _register_admin(admin_site, model, admin_class):
    
    try:
        admin_site.register(model, admin_class)
    except admin.sites.AlreadyRegistered:
        pass
573983
public function initDatabase()
    {
        $this->call('migrate');

        if (Administrator::count() == 0) {
            $this->call('db:seed', ['--class' => \Lia\Auth\Database\AdminTablesSeeder::class]);
        }
    }
277799
protected function createAdminUser($admin, $output)
    {
        try {
            $this->reloadConfig();

            $userStore = Factory::getStore('User');
            $userService = new UserService($userStore);
            $userService->createUser($admin['name'], $admin['mail'], $admin['pass'], 1);

            $output->writeln('<info>'.Lang::get('user_created').'</info>');
        } catch (\Exception $ex) {
            $output->writeln('<error>'.Lang::get('failed_to_create').'</error>');
            $output->writeln('<error>' . $ex->getMessage() . '</error>');
        }
    }
518175
public function initialize()
    {
        parent::initialize();

        $this->loadComponent('Flash');

        $this->loadComponent('CakeAdmin.CakeAdmin');

        $this->loadComponent('Auth', [
            'authorize' => ['Controller'],
            'authenticate' => [
                'Basic' => [
                    'userModel' => 'CakeAdmin.Administrators'
                ],
                'Form' => [
                    'userModel' => 'CakeAdmin.Administrators',
                    'fields' => Configure::read('CA.fields'),
                    'scope' => ['Administrators.cakeadmin' => true]
                ],
            ],
            'loginAction' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Users',
                'action' => 'login'
            ],
            'loginRedirect' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Dashboard',
                'action' => 'index'
            ],
            'logoutRedirect' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Users',
                'action' => 'login'
            ]
        ]);

        $this->Auth->sessionKey = 'Auth.CakeAdmin';
        $this->authUser = $this->Auth->user();

        $this->loadComponent('Utils.GlobalAuth');
        $this->loadComponent('Csrf');
        $this->loadComponent('Utils.Menu');
        $this->loadComponent('CakeAdmin.PostTypes');
        $this->loadComponent('Notifier.Notifier');

        $event = new Event('CakeAdmin.Controller.afterInitialize', $this);
        EventManager::instance()->dispatch($event);
    }
78416
public function _initialize()
    {
        parent::_initialize();

        $this->configBackCompat();

        $adminPath = $this->config['adminPath'];
        $this->loginUrl = str_replace('wp-admin', 'wp-login.php', $adminPath);
        $this->adminPath = rtrim($adminPath, '/');
        $this->pluginsPath = $this->adminPath . '/plugins.php';
    }
764222
public void initialize(List<StorageAccount> accts)
        throws StorageException {

        storageAccounts = new HashMap<>();
        for (StorageAccount acct : accts) {
            storageAccounts.put(acct.getId(), acct);
            if (acct.isPrimary()) {
                primaryStorageProviderId = acct.getId();
            }
        }

        // Make sure a primary provider is set
        if (primaryStorageProviderId == null) {
            primaryStorageProviderId = accts.get(0).getId();
        }
    }
618198
protected void setAdminState(AdminStates newState) {
    if (newState == AdminStates.NORMAL) {
      adminState = null;
    }
    else {
      adminState = newState;
    }
  }
213875
protected function initialize(array $config = [])
    {
        // Create a resolve and configure the defaults
        $resolver = new OptionsResolver();
        $this->configureDefaults($resolver);

        try
        {
            // Parse the config in avanzu_admin_theme.options as array object in avanzu_admin_context.options
            $newConfig = $resolver->resolve($config);
            // Change the internal storage array in the ArrayObject
            $this->exchangeArray($newConfig);
        }
        catch(UndefinedOptionsException $e)
        {
            echo $e->getMessage() . PHP_EOL;
            print_r($config, TRUE);
        }
    }
781227
public function storage_init()
    {
        // already initialized
        if (is_object($this->storage)) {
            return;
        }

        $driver       = $this->config->get('storage_driver', 'imap');
        $driver_class = "rcube_{$driver}";

        if (!class_exists($driver_class)) {
            self::raise_error(array(
                'code' => 700, 'type' => 'php',
                'file' => __FILE__, 'line' => __LINE__,
                'message' => "Storage driver class ($driver) not found!"),
                true, true);
        }

        // 
        $this->storage = new $driver_class;

        // for backward compat. (deprecated, will be removed)
        $this->imap = $this->storage;

        // set class options
        $options = array(
            'auth_type'      => $this->config->get("{$driver}_auth_type", 'check'),
            'auth_cid'       => $this->config->get("{$driver}_auth_cid"),
            'auth_pw'        => $this->config->get("{$driver}_auth_pw"),
            'debug'          => (bool) $this->config->get("{$driver}_debug"),
            'force_caps'     => (bool) $this->config->get("{$driver}_force_caps"),
            'disabled_caps'  => $this->config->get("{$driver}_disabled_caps"),
            'socket_options' => $this->config->get("{$driver}_conn_options"),
            'timeout'        => (int) $this->config->get("{$driver}_timeout"),
            'skip_deleted'   => (bool) $this->config->get('skip_deleted'),
            'driver'         => $driver,
        );

        if (!empty($_SESSION['storage_host'])) {
            $options['language'] = $_SESSION['language'];
            $options['host']     = $_SESSION['storage_host'];
            $options['user']     = $_SESSION['username'];
            $options['port']     = $_SESSION['storage_port'];
            $options['ssl']      = $_SESSION['storage_ssl'];
            $options['password'] = $this->decrypt($_SESSION['password']);
            $_SESSION[$driver.'_host'] = $_SESSION['storage_host'];
        }

        $options = $this->plugins->exec_hook("storage_init", $options);

        // for backward compat. (deprecated, to be removed)
        $options = $this->plugins->exec_hook("imap_init", $options);

        $this->storage->set_options($options);
        $this->set_storage_prop();

        // subscribe to 'storage_connected' hook for session logging
        if ($this->config->get('imap_log_session', false)) {
            $this->plugins->register_hook('storage_connected', array($this, 'storage_log_session'));
        }
    }
1166058
protected function init() {
		$this->register_cli();
		if ( ! $this->name ) {
			$this->name = $this->default_table_name();
		}
		// On admin screen, should check db version.
		add_action( 'admin_init', function () {
			// If this is Ajax request, do nothing.
			if ( wp_doing_ajax() ) {
				return;
			}
			$this->create_table();
		}, $this->priority );
	}
1246129
public function initDatabase()
    {
        $this->call('migrate');

        $userModel = config('admin.database.users_model');

        if ($userModel::count() == 0) {
            $this->call('db:seed', ['--class' => \Encore\Admin\Auth\Database\AdminTablesSeeder::class]);
        }
    }