check for isEnabled
6818
public boolean readHistoryEnabledForField(String index, String field) {
        
        if(!this.enabled) {
            return false;
        }
        
        if(searchguardIndex.equals(index)) {
            return logInternalConfig;
        }
        
        try {
            final Set<String> fields = cache.get(index);
            if(fields.isEmpty()) {
                return false;
            }

            return WildcardMatcher.matchAny(fields, field);
        } catch (ExecutionException e) {
            log.error(e);
            return true;
        }
    }
605421
public static function isEnabled()
    {
        if (!self::$_checkedEnabled) {
            self::$_checkedEnabled = true;

            $conf = self::getConfiguration();

            $enabled = false;
            if (strtolower($conf->trigger) == 'always') {
                $enabled = true;
            } elseif (strtolower($conf->trigger) == 'parameter') {
                if ((isset($_GET['profile']) && $_GET['profile'] == true) || (isset($_COOKIE['profile']) && $_COOKIE['profile'] == true)) {
                    $enabled = true;
                }
            }

            // Process filters
            if ($enabled && $conf->enableFilters) {

                // sampling filter
                if ($enabled && rand(0,100000) > $conf->filters->sampling * 1000) {
                    $enabled = false;
                }

                // request uri whitelist/blacklist
                $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; // TODO: use script name instead for cli?
                if ($enabled && $conf->filters->requestUriWhiteList && !preg_match($conf->filters->requestUriWhiteList, $requestUri)) {
                    $enabled = false;
                }
                if ($enabled && $conf->filters->requestUriBlackList && preg_match($conf->filters->requestUriBlackList, $requestUri)) {
                    $enabled = false;
                }

                // note: timeThreshold and memoryThreshold will be checked before persisting records. In these cases data will still be recorded during the request
            }

            if ($enabled) {
                self::enable();
            }
        }
        return self::$_enabled;
    }
1025222
public boolean isErrorEnabled()
    {
        if (IS12)
        {
            return getLogger().isEnabledFor(Level.ERROR);
        }
        return getLogger().isEnabledFor(Level.ERROR);
    }
1068386
def isEnabled(self):
        
        
        if self._linkEnabledToCurrent:
            addtl = self.isCurrent()
        else:
            addtl = True
        
        return self._enabled and addtl
733430
public function isEnabled()
    {
        return isset($this->config->enable->value) && $this->config->enable->value;
    }
1091682
def is_unlocked(self):
        """"""
        if self.is_public:
            return True

        if not self.is_protected:
            return True

        return self._key.unlocked
929210
function isEnabled( $useCache = true )
    {
        if ( isset( $this->UserCache['info'][$this->ContentObjectID]['is_enabled'] ) && $useCache )
        {
            return $this->UserCache['info'][$this->ContentObjectID]['is_enabled'];
        }

        $setting = eZUserSetting::fetch( $this->attribute( 'contentobject_id' ) );
        if ( $setting and !$setting->attribute( 'is_enabled' ) )
        {
            return false;
        }
        return true;
    }
793648
def enabled(self):
        """"""
        enabled = self._enabled
        if not enabled:
            return False

        if self.parent and isinstance(self.parent, Widget):
            if self.parent.enabled == False:
                return False

        return True
468587
def is_wifi_enabled(cls):
        
        app = AndroidApplication.instance()
        f = app.create_future()

        def on_permission_result(result):
            if not result:
                f.set_result(None)
                return

            def on_ready(m):
                m.isWifiEnabled().then(f.set_result)

            WifiManager.get().then(on_ready)

        #: Check permission
        WifiManager.request_permission([
            WifiManager.PERMISSION_ACCESS_WIFI_STATE
        ]).then(on_permission_result)
        return f
960216
public boolean isInfoEnabled() {
        if (repository.isDisabled(Level.INFO_INT))
            return false;
        return Level.INFO.isGreaterOrEqual(this.getEffectiveLevel());
    }
549720
public boolean isDisabled(FaceletContext ctx) {
        return disabled != null && Boolean.TRUE.equals(disabled.getBoolean(ctx));
    }
398495
public static boolean isEnabled(Config cfg) {
    return cfg.hasPath(ConfigurationKeys.METRICS_ENABLED_KEY) ? cfg.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY)
        : Boolean.parseBoolean(ConfigurationKeys.DEFAULT_METRICS_ENABLED);
  }
704592
public static boolean isEnabled(UICommand command, UIContext context)
   {
      return (command.isEnabled(context) && !(command instanceof UIWizardStep));
   }
1237843
def is_disabled_action(view):
    
    if not isinstance(view, core_views.ActionsViewSet):
        return False

    action = getattr(view, 'action', None)
    return action in view.disabled_actions if action is not None else False
463920
public function is_disabled() {
        $lockedgrade = $lockedgradeitem = 0;
        if (!empty($this->grade->locked)) {
            $lockedgrade = 1;
        }
        if (!empty($this->grade->grade_item->locked)) {
            $lockedgradeitem = 1;
        }
        return ($lockedgrade || $lockedgradeitem);
    }
552262
def getAutoServiceLevelEnabled(self):
    """"""
    command = '$GE'
    settings = self.sendCommand(command)
    flags = int(settings[2], 16)
    return not (flags & 0x0020)
8411
def is_enactable(self, as_of):
        """"""
        return \
            not self.disabled and \
            not self.archived and \
            not self._is_finished(as_of) and \
            self._is_ready(as_of) and \
            not self._is_billing_complete()