Initializes the module.
556999
public function init()
    {
        // Set a @modules alias pointed to the modules/ directory
        Craft::setAlias('@modules', __DIR__);

        // Set the controllerNamespace based on whether this is a console or web request
        if (Craft::$app->getRequest()->getIsConsoleRequest()) {
            $this->controllerNamespace = 'modules\\console\\controllers';
        } else {
            $this->controllerNamespace = 'modules\\controllers';
        }

        parent::init();

        // Custom initialization code goes here...
    }
605254
protected function initialize()
    {
        $this->rm = new DefaultRoleManager(10);
        $this->eft = new DefaultEffector();
        $this->watcher = null;

        $this->enabled = true;
        $this->autoSave = true;
        $this->autoBuildRoleLinks = true;
    }
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__
        );
    }
762282
public function init()
    {

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

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

    }
106715
@Override
    public void initModule() throws ModuleInitializationException {

        String dsMediation = getParameter("doMediateDatastreams");
        if (dsMediation == null) {
            throw new ModuleInitializationException("doMediateDatastreams parameter must be specified.",
                                                    getRole());
        }
    }
386163
public function initialize()
    {
        parent::initialize();
        $this->loadComponent('FrankFoerster/Filter.Filter');
        $this->loadComponent('RequestHandler');

        $this->loadModel('Wasabi/Cms.Menus');
        $this->loadModel('Wasabi/Cms.MenuItems');
    }
537490
public static function initModules() {
        $cfg = ServiceContainer::get('config');
        $moduleList = $cfg->getConfigData('modules');
        if (count($moduleList) > 0) {
            foreach ($moduleList as $moduleName) {
                self::loadModule($moduleName);
            }
        }
    }
498439
protected static function initialize() {
		if(file_exists("cache/dachi.modules.json")) {
			$modules = json_decode(file_get_contents("cache/dachi.modules.json"));

			foreach($modules as $module)
				self::$modules[$module->shortname] = new Module($module);
		}
	}
1183632
private synchronized static void initConfigs() {
        for (int i = 0; i < moduleIDs.length; i++) {
            // add module configs one by one
            //addModuleInfo(moduleIDs[i] + modulePrefix);
            // don't do validation since in pre-defined module
            getConfigFromXMLFile(getXmlFileName(modulePrefix + moduleIDs[i]), true, false);
        }
    }
1049131
def _init():
    
    global finder

    if finder is None:
        finder = ModuleFinder()

    if finder not in sys.meta_path:
        sys.meta_path.insert(0, finder)
68777
public function init()
    {
        parent::init();

        self::$plugin = $this;

        $this->_setPluginComponents();
        $this->_setLogging();
        $this->_registerCpRoutes();
        $this->_registerEventHandlers();
    }
1129742
public function init()
    {
        parent::init();
        $this->layout = $this->module->defaultLayout;
        $this->menu = $this->getSubMenu();
    }
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
    }
1197833
protected void initModule() {

        Object o;
        CmsModule module;

        // first get the correct module
        if (CmsStringUtil.isNotEmpty(m_paramModule)) {
            module = (CmsModule)OpenCms.getModuleManager().getModule(m_paramModule).clone();
        } else {
            // create a new module
            module = new CmsModule();
        }

        // now try to get the dependency
        if (CmsStringUtil.isEmpty(getParamAction()) || CmsDialog.DIALOG_INITIAL.equals(getParamAction())) {
            o = null;
        } else {
            // this is not the initial call, get module dependency from session
            o = getDialogObject();
        }

        if (!(o instanceof CmsModuleDependency)) {
            if (m_paramDependency == null) {
                // there was no parameter given, so create a new, empty dependency
                m_dependency = new CmsModuleDependency();
            } else {
                // create a new module dependency by reading it from the module
                List dependencies = module.getDependencies();
                m_dependency = new CmsModuleDependency();
                if ((dependencies != null) && (dependencies.size() > 0)) {
                    Iterator i = dependencies.iterator();
                    while (i.hasNext()) {
                        CmsModuleDependency dependency = (CmsModuleDependency)i.next();
                        if (dependency.getName().equals(m_paramDependency)) {
                            m_dependency = dependency;
                        }
                    }
                }
            }

        } else {
            // reuse module dependency stored in session
            m_dependency = (CmsModuleDependency)o;
        }

    }
172110
public function init() {
		if (!isset($this->options['id'])) {
			$this->options['id'] = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
		}
		parent::init();
	}
1251657
public function Initialize() {
      $this->ModuleSortContainer = 'Profile';
      $this->Head = new HeadModule($this);
      $this->AddJsFile('jquery.js');
      $this->AddJsFile('jquery.livequery.js');
      $this->AddJsFile('jquery.form.js');
      $this->AddJsFile('jquery.popup.js');
      $this->AddJsFile('jquery.gardenhandleajaxform.js');
      $this->AddJsFile('global.js');
      
      $this->AddCssFile('style.css');
      $this->AddModule('GuestModule');
      parent::Initialize();
      
      Gdn_Theme::Section('Profile');
      
      if ($this->EditMode)
         $this->CssClass .= 'EditMode';

      $this->SetData('Breadcrumbs', array());
      $this->CanEditPhotos = C('Garden.Profile.EditPhotos') || Gdn::Session()->CheckPermission('Garden.Users.Edit');
   }
1360258
public function init() {
        //If available load the config from the security file, else create a new array
        if ($this->securityFile) {
            if (!$this->loadSecurityConfiguration()) {
                $this->config = array();
            }
        } else {
            $this->config = array();
        }
        //Set ready to true
        $this->ready = true;
    }