Returns trues if targeting is enabled.
428925
public static boolean isTargetingEnabled() {
        Configuration config = ConfigUtils.getCurrentConfig();
        if (config != null) {
            return config.getBoolean(TARGETING_ENABLED_CONFIG_KEY, false);
        } else {
            return false;
        }
    }
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;
    }
1069954
protected function _isActionEnabled() {
		$actions = $this->getConfig('actions');
		if (!$actions) {
			return true;
		}

		return in_array($this->getController()->getRequest()->getParam('action'), $actions, true);
	}
1078085
public function hasTarget(Target $target): bool
    {
        foreach ($this->_allOfType($target->type()) as $t) {
            if ($target->equals($t)) {
                return true;
            }
        }
        return false;
    }
1224673
public boolean isTraceEnabled() {
		return MINIMUM_LEVEL_COVERS_TRACE && provider.isEnabled(STACKTRACE_DEPTH, null, org.tinylog.Level.TRACE);
	}
206644
public void setTargeting(com.google.api.ads.admanager.axis.v201805.Targeting targeting) {
        this.targeting = targeting;
    }
1126064
public function is_enabled() {
        if ($this->enabledcache === null) {
            $this->enabledcache = $this->get_config('enabled');
        }
        return $this->enabledcache;
    }
1096371
private boolean isEnabled() {

        try {
            if ((m_engineState == CmsPublishEngineState.ENGINE_STOPPED)
                || (m_engineState == CmsPublishEngineState.ENGINE_STARTED)) {
                OpenCms.getLoginManager().checkLoginAllowed();
                return true;
            } else {
                return false;
            }
        } catch (CmsAuthentificationException e) {
            return false;
        }
    }
1256449
public function isDefaultTargetUsingTarget()
    {
        return $this->getDefaultTargetUseURI() === CNabuSiteTargetLink::USE_URI_TRANSLATED &&
               $this->nb_site_target_list->containsKey($this->getDefaultTargetId());
    }
1059702
public function isFocused()
    {
        if ($this->focused === true) {
            return $this->focused;
        }

        foreach ($this->tests as $test) {
            if ($test->isFocused()) {
                return true;
            }
        }

        return false;
    }
269390
public boolean isFocusTarget(int col)
    {
        if (this.getGridModel() != null)
            if (this.getGridModel().getColumnClass(col) == String.class)
                return true;
        return false;
    }
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;
    }
366896
def has_target(alias, target):
    '''
    
    '''
    if target == '':
        raise SaltInvocationError('target can not be an empty string')
    aliases = list_aliases()
    if alias not in aliases:
        return False
    if isinstance(target, list):
        target = ', '.join(target)
    return target == aliases[alias]
1139107
public static function isEnabled()
      {
          $ini = eZINI::instance( 'squid.ini' );

          if ( $ini->hasSection( 'Squid' )
                && $ini->hasVariable( 'Squid', 'PurgeCacheOnPublish' )
                    && $ini->variable( 'Squid', 'PurgeCacheOnPublish' ) == 'enabled' )
          {
              return true;
          }
          else
          {
              return false;
          }
      }
214009
def is_type_target(self):
        
        if self._is_type_target is None:
            #All we need to do is search through the custom types in the parent
            #module and see if any of their executables points to this method.
            self._is_type_target = False
            for tkey in self.module.types:
                custype = self.module.types[tkey]
                for execkey, execinst in custype.executables.items():
                    if execinst.target is self:
                        self._is_type_target = custype
                        break
                if self._is_type_target:
                    break

        return self._is_type_target
884027
public function isEnabled()
    {
        $path = $this->directory.'/'.self::FLAG_FILENAME;
        return (bool)$this->pathHelper->getPublicPath($path);
    }
911388
public boolean markInactive() {
		if (TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state) {
			state = TaskSlotState.ALLOCATED;

			return true;
		} else {
			return false;
		}
	}