@param number $module_id
@param string $module_type
@param string $module_unique_affix

@return FS_Admin_Menu_Manager
541549
static function instance( $module_id, $module_type, $module_unique_affix ) {
			$key = 'm_' . $module_id;

			if ( ! isset( self::$_instances[ $key ] ) ) {
				self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
			}

			return self::$_instances[ $key ];
		}
892161
public function editEditor($module_id, $file_id)
    {
        $this->setModuleEditor($module_id);
        $this->setFilePathEditor($file_id);
        $this->setTitleEditEditor();
        $this->setBreadcrumbEditEditor();
        $this->setMessageEditEditor();

        $this->setData('module', $this->data_module);
        $this->setData('can_save', $this->canSaveEditor());
        $this->setData('lines', count(file($this->data_file)));
        $this->setData('editor.content', file_get_contents($this->data_file));

        $this->submitEditor();
        $this->setJsSettingsEditor();
        $this->outputEditEditor();
    }
120669
protected function isEnabledModule($module_id)
    {
        $sql = 'SELECT module_id FROM module WHERE module_id=? AND status > 0';
        $result = $this->db->fetchColumn($sql, array($module_id));
        return !empty($result);
    }
544003
public function checkRequirements($module_id)
    {
        $this->checkModuleId($module_id);
        $module = $this->module->getInfo($module_id);
        $this->checkCore($module);
        $this->checkPhpVersion($module);

        if ($this->module->isInstaller($module_id)) {
            $error = $this->translation->text('Modules with "installer" type cannot be installed/enabled when system is already set up');
            throw new UnexpectedValueException($error);
        }

        $this->checkDependenciesExtensions($module);
        $this->checkDependenciesModule($module_id);
        return true;
    }
506698
def get_current_module_ident(moduleid, plpy):
    
    plan = plpy.prepare('''\
        SELECT m.module_ident FROM modules m
        WHERE m.moduleid = $1 ORDER BY revised DESC''', ('text',))
    results = plpy.execute(plan, (moduleid,), 1)
    if results:
        return results[0]['module_ident']
575606
def register_flag_by_module_id(self, module_id, flag):
    
    flags_by_module_id = self.flags_by_module_id_dict()
    flags_by_module_id.setdefault(module_id, []).append(flag)
11270
function hotCreateModule(moduleId) {
/******/ 		var hot = {
/******/ 			// private stuff
/******/ 			_acceptedDependencies: {},
/******/ 			_declinedDependencies: {},
/******/ 			_selfAccepted: false,
/******/ 			_selfDeclined: false,
/******/ 			_disposeHandlers: [],
/******/ 			_main: hotCurrentChildModule !== moduleId,
/******/
/******/ 			// Module API
/******/ 			active: true,
/******/ 			accept: function(dep, callback) {
/******/ 				if (dep === undefined) hot._selfAccepted = true;
/******/ 				else if (typeof dep === "function") hot._selfAccepted = dep;
/******/ 				else if (typeof dep === "object")
/******/ 					for (var i = 0; i < dep.length; i++)
/******/ 						hot._acceptedDependencies[dep[i]] = callback || function() {};
/******/ 				else hot._acceptedDependencies[dep] = callback || function() {};
/******/ 			},
/******/ 			decline: function(dep) {
/******/ 				if (dep === undefined) hot._selfDeclined = true;
/******/ 				else if (typeof dep === "object")
/******/ 					for (var i = 0; i < dep.length; i++)
/******/ 						hot._declinedDependencies[dep[i]] = true;
/******/ 				else hot._declinedDependencies[dep] = true;
/******/ 			},
/******/ 			dispose: function(callback) {
/******/ 				hot._disposeHandlers.push(callback);
/******/ 			},
/******/ 			addDisposeHandler: function(callback) {
/******/ 				hot._disposeHandlers.push(callback);
/******/ 			},
/******/ 			removeDisposeHandler: function(callback) {
/******/ 				var idx = hot._disposeHandlers.indexOf(callback);
/******/ 				if (idx >= 0) hot._disposeHandlers.splice(idx, 1);
/******/ 			},
/******/
/******/ 			// Management API
/******/ 			check: hotCheck,
/******/ 			apply: hotApply,
/******/ 			status: function(l) {
/******/ 				if (!l) return hotStatus;
/******/ 				hotStatusHandlers.push(l);
/******/ 			},
/******/ 			addStatusHandler: function(l) {
/******/ 				hotStatusHandlers.push(l);
/******/ 			},
/******/ 			removeStatusHandler: function(l) {
/******/ 				var idx = hotStatusHandlers.indexOf(l);
/******/ 				if (idx >= 0) hotStatusHandlers.splice(idx, 1);
/******/ 			},
/******/
/******/ 			//inherit from previous dispose call
/******/ 			data: hotCurrentModuleData[moduleId]
/******/ 		};
/******/ 		hotCurrentChildModule = undefined;
/******/ 		return hot;
/******/ 	}
944865
protected function setModule($module_id)
    {
        $this->data_module = $this->module->get($module_id);

        if (empty($this->data_module)) {
            $this->outputHttpStatus(403);
        }
    }
1163294
private function fetch_wp_org_module_translation_updates( $module_type, $slug ) {
            $plugin_data = $this->_fs->get_plugin_data();

            $locales = array_values( get_available_languages() );
            $locales = apply_filters( "{$module_type}_update_check_locales", $locales );
            $locales = array_unique( $locales );

            $plugin_basename = $this->_fs->get_plugin_basename();
            if ( 'themes' === $module_type ) {
                $plugin_basename = $slug;
            }

            global $wp_version;

            $request_args = array(
                'timeout' => 15,
                'body'    => array(
                    "{$module_type}" => json_encode(
                        array(
                            "{$module_type}" => array(
                                $plugin_basename => array(
                                    'Name'   => trim( str_replace( $this->_fs->get_plugin()->premium_suffix, '', $plugin_data['Name'] ) ),
                                    'Author' => $plugin_data['Author'],
                                )
                            )
                        )
                    ),
                    'translations'    => json_encode( $this->get_installed_translations( $module_type, $slug ) ),
                    'locale'          => json_encode( $locales )
                ),
                'user-agent' => ( 'WordPress/' . $wp_version . '; ' . home_url( '/' ) )
            );

            $url = "http://api.wordpress.org/{$module_type}/update-check/1.1/";
            if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
                $url = set_url_scheme( $url, 'https' );
            }

            $raw_response = Freemius::safe_remote_post(
                $url,
                $request_args,
                WP_FS__TIME_24_HOURS_IN_SEC,
                WP_FS__TIME_12_HOURS_IN_SEC,
                false
            );

            if ( is_wp_error( $raw_response ) ) {
                return null;
            }

            $response = json_decode( wp_remote_retrieve_body( $raw_response ), true );

            if ( ! is_array( $response ) ) {
                return null;
            }

            if ( ! isset( $response['translations'] ) || empty( $response['translations'] ) ) {
                return null;
            }

            return $response['translations'];
        }
415459
public function setModuleKey(string $module_key)
    {
        if (!nb_isValidKey($module_key)) {
            throw new ENabuProviderException(ENabuProviderException::ERROR_MODULE_KEY_NOT_VALID, array($module_key));
        }
        $this->setValue(self::MODULE_KEY, $module_key);

        try {
            $this->getComplexKey();
        } catch (ENabuProviderException $ex) {

        }

        return $this;
    }
1084714
public static function url($id, $module_id = '') {
        $absolute_urls = false;
        if($module_id == '') {
            $module = \jacmoe\mdpages\Module::getInstance();
            if(!is_null($module)) {
                $module_id = $module->id;
                $absolute_urls = $module->absolute_wikilinks;
            }
        }
        if($module_id != '') {
            return Url::to(array('/' . $module_id . '/page/view', 'id' => $id), $absolute_urls);
        }
    }
200577
public function setSettings($module_id, array $settings)
    {
        $result = false;

        if ($this->isInstalled($module_id)) {
            $this->update($module_id, array('settings' => $settings));
            $result = true;
        } else if ($this->isActiveTheme($module_id)) {
            $data = array('status' => true, 'settings' => $settings, 'module_id' => $module_id);
            $this->add($data);
            $result = true;
        }

        return $result;
    }
529333
function get_original_menu_slug() {
			if ( 'cpt' === $this->_type ) {
				return add_query_arg( array(
					'post_type' => $this->_menu_slug
				), 'edit.php' );
			}

			if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
				return $this->_menu_slug;
			} else {
				return $this->_module_unique_affix;
			}
		}
43608
public function listEditor($module_id)
    {
        $this->setModuleEditor($module_id);
        $this->setTitleListEditor();
        $this->setBreadcrumbListEditor();

        $this->setData('module', $this->data_module);
        $this->setData('files', $this->getFilesEditor());

        $this->outputListEditor();
    }
985677
public function attachMenuItemToForeignModule(
        string $foreignMenuLink,
        MenuItem $internalMenuItem,
        MenuItem $menuItem
    ) {
        $foreignMenuItem = $this->getMenuItemByLink($foreignMenuLink);
        if (!is_null($foreignMenuItem)) {
            $foreignMenuItem->addChild($menuItem);
        } else {
            $internalMenuItem->addChild($menuItem);
            $this->attachMenuItem($internalMenuItem);
        }
    }
408549
protected function CreateMenuAdmin()
	{
		// Load Language file for Module Object
		$lang = LanguageFactory::GetLanguageCollection("AdminModules");
		
		// Create a Menu Item for GROUPS and MODULES. 
		// This menu have CP_ before GROUP NAME
		$itGroup = $this->GetAdminGroups();
		
		while ($itGroup->hasNext())
		{
			$srGroup = $itGroup->moveNext();
			$this->defaultXmlnukeDocument->addMenuGroup($lang->Value("GROUP_" . strtoupper($srGroup->getField("name"))), "CP_" . $srGroup->getField("name"));
			
			$arrModules = $this->GetAdminModules($srGroup->getField("name"));
			
			foreach ($arrModules as $key=>$value)
			{
				$url = $value[1];
				$name = $key;
				$icon = $value[0];

				if ($url != "")
				{
					$this->defaultXmlnukeDocument->addMenuItem(
						$url,
						$lang->Value("MODULE_TITLE_" . strtoupper($name)),
						$lang->Value("MODULE_ABSTRACT_" . strtoupper($name)),
						"CP_" . $srGroup->getField("name"),
						$icon);
				}
			}
		}

		return $lang;
	}
178106
public function getModuleSettings($module_id, $key = null, $default = null)
    {
        return $this->module->getSettings($module_id, $key, $default);
    }