Checks whether this module has a settings menu.

@author Leo Fajardo (@leorw)
@since  1.2.2

@return bool
497434
function has_settings_menu() {
            return ( $this->_is_network_active && fs_is_network_admin() ) ?
                $this->_menu->has_network_menu() :
                $this->_menu->has_menu();
        }
41267
public function hasOptionsForm()
    {
        $env = Environment::get();
        $rec = $env->getRecord(
            DIRNAME_ELEMENTS . '/' . DIRNAME_CONVERSATIONS . '/' . DIRNAME_CONVERSATION_EDITOR . '/' .
            $this->cnvEditorHandle . '/' . FILENAME_CONVERSATION_EDITOR_OPTIONS,
            $this->getPackageHandle()
        );

        return $rec->exists();
    }
264416
public static function isEnabled(): bool
    {
        static::init();

        if (array_key_exists(self::ENABLED, static::$config)) {
            return static::$config[self::ENABLED] ?? false;
        }

        return static::getParameterName() !== null;
    }
511271
public static boolean checkConfiguredInModules() {

        Boolean result = m_moduleCheckCache.get();
        if (result == null) {
            result = Boolean.valueOf(getConfiguredTemplateMapping() != null);
            m_moduleCheckCache.set(result);
        }
        return result.booleanValue();
    }
164024
public function isEnabled(): bool
    {
        // Enabled flag is set to false
        if (!$this->enabled) {
            return false;
        }

        // Evaluate each one of the defined conditions
        foreach ($this->conditions as $condition) {
            $disabled = call_user_func($condition, $this);
            if ($disabled) {
                return false;
            }
        }

        // Parent menu items are enabled only and only if they have at least one child enabled
        if (!empty($this->menuItems)) {
            foreach ($this->menuItems as $menuItem) {
                Assert::isInstanceOf($menuItem, MenuItemInterface::class);
                if ($menuItem->isEnabled()) {
                    return true;
                }
            }

            return false;
        }

        return true;
    }
856052
public function isTabbed()
    {
        $ident    = $this->ident();
        $metadata = $this->adminSecondaryMenu();

        if (isset($metadata[$ident])) {
            return $this->hasLinks() ||
                   $this->hasGroups() ||
                   $this->hasActions();
        }

        return false;
    }
225385
protected function checkSettings()
    {
        if (empty($this->settings['additional']['detailPid'])) {
            $this->settings['additional']['detailPid'] = $GLOBALS['TSFE']->id;
        }

        if (empty($this->settings['additional']['listPid'])) {
            $this->settings['additional']['listPid'] = $GLOBALS['TSFE']->id;
        }

        if (empty($this->settings['associationID'])) {
            $this->addFlashMessage(
          'Please set a association',
          'Configuration Error',
          FlashMessage::ERROR
        );
        }
    }
131724
public static function defaults_set() {
        list($purposeid, $categoryid) = self::get_defaults(CONTEXT_SYSTEM);
        if (empty($purposeid) || empty($categoryid)) {
            return false;
        }
        return true;
    }
1084063
public function isActive()
    {
        $moduleId = $this->getExtensionId();
        $moduleIsActive = false;

        $modules = $this->getExtendedClasses();

        if (is_array($modules)) {
            // Check if module was ever installed.
            $moduleExists = false;
            foreach ($modules as $extendPath) {
                if (false !== strpos($extendPath, '/' . $moduleId . '/')) {
                    $moduleExists = true;
                    break;
                }
            }

            // If module exists, check if it is not disabled.
            if ($moduleExists) {
                $disabledModules = $this->getDisabledModules();
                if (!(is_array($disabledModules) && in_array($moduleId, $disabledModules))) {
                    $moduleIsActive = true;
                }
            }
        }

        return $moduleIsActive;
    }
431624
public function enabled() : bool
    {
        if ($this->isEnabled !== null) {
            return $this->isEnabled;
        }

        if (!$this->config->get("antispam.{$this->instanceType}.enabled", true)) {
            return $this->isEnabled = false;
        }

        $disabledEnv = (array) $this->config->get("antispam.{$this->instanceType}.disabled_env", []);

        if (in_array($this->config->get('app.env', 'production'), $disabledEnv)) {
            return $this->isEnabled = false;
        }

        if ($this->instanceType === 'recaptcha') {
            if ($this->config->get('antispam.recaptcha.guests_only', false) && $this->request->user() !== null) {
                return $this->isEnabled = false;
            }
        }

        return $this->isEnabled = true;
    }
141056
public static function _maybe_update_settings() {
		if ( ! empty( $_POST['menu-icons']['settings'] ) ) {
			check_admin_referer( self::UPDATE_KEY, self::UPDATE_KEY );

			$redirect_url = self::_update_settings( $_POST['menu-icons']['settings'] ); // Input var okay.
			wp_redirect( $redirect_url );
		} elseif ( ! empty( $_REQUEST[ self::RESET_KEY ] ) ) {
			check_admin_referer( self::RESET_KEY, self::RESET_KEY );
			wp_redirect( self::_reset_settings() );
		}
	}
1209530
public function list_settings()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/get/setting');

        return $this->process_response($response);
    }
494398
public function menuActive()
    {
        $idParents = self::getIdParents();
        
        if (in_array( $this->id, $idParents ))
        {
            return true;
        }
        return false;
    }
405684
protected function loadSettings()
    {
        $result = Eresus_CMS::getLegacyKernel()->db
            ->selectItem('plugins', "`name`='" . $this->getName() . "'");
        if ($result)
        {
            $this->settings = decodeOptions($result['settings'], $this->settings);
        }
        return (bool) $result;
    }
1237609
protected function hasModule()
    {
        global $post;

        $postId = null;
        $modules = array();
        $archiveSlug = \Modularity\Helper\Wp::getArchiveSlug();

        if ($archiveSlug) {
            $postId = $archiveSlug;
        } elseif (isset($post->ID)) {
            $postId = $post->ID;
        } else {
            return apply_filters('Modularity/hasModule', false, null);
        }

        $modules = \Modularity\Editor::getPostModules($postId);
        $modules = array_merge($modules, $this->getShortcodeModules($postId));
        $modules = array_merge($modules, $this->getOnePageModules($postId));

        $modules = json_encode($modules);

        $moduleSlug = $this->moduleSlug;
        if (empty($moduleSlug)) {
            $moduleSlug = isset($this->data['post_type']) ? $this->data['post_type'] : null;
        }

        return apply_filters('Modularity/hasModule', strpos($modules, '"post_type":"' . $moduleSlug . '"') == true, $archiveSlug);
    }
419966
public function setSmtpConfig()
    {
        $names = $this->getNames();
        foreach ($names as $name) {
            $model = self::findOne(['name' => $name]);
            if ($model != null) {
                $model->value = $this->$name;
                $result = $model->save(false);
            } else {
                $model = new Options();
                $model->name = $name;
                $model->value = $this->$name;
                $result = $model->save(false);
            }
            if ($result == false) {
                return $result;
            }
        }
        return true;
    }
1083488
public function initEngine()
    {

        if (!$this->setting) {
            return false;
        }

        foreach ($this->setting as $key => $value) {
            if (empty($key) || !property_exists($this->engine, $key)) {
                continue;
            }

            $this->engine->{$key} = $this->setting->{$key};
        }

        return true;
    }