@return bool Whether the configuration is enabled

@throws InvalidArgumentException When the config is not enableable
1100
protected function isConfigEnabled(ContainerBuilder $container, array $config)
    {
        if (!array_key_exists('enabled', $config)) {
            throw new InvalidArgumentException("The config array has no 'enabled' key.");
        }

        return (bool) $container->getParameterBag()->resolveValue($config['enabled']);
    }
521565
private function isEnabled($module)
    {
        if (!array_key_exists($module, $this->enabled)) {
            throw new \InvalidArgumentException("Module '$module' cannot be enabled or disabled. Only [".implode(', ', array_keys($this->enabled)).'] can.');
        }

        return $this->enabled[$module];
    }
647371
public static function isAuditingEnabled(): bool
    {
        if (App::runningInConsole()) {
            return Config::get('audit.console', false);
        }

        return Config::get('audit.enabled', true);
    }
337412
public function getConfiguration()
    {
        if (null === $this->configuration) {
            $errMsg = 'no attribute \'configuration\'';
            throw new Exception\InvalidConfigurationNameException($errMsg);
        }
        return $this->configuration;
    }
84600
public function check()
    {
        $result = true;

        $configurationSettings = [
            'Database.Host',
            'Database.Username',
            'Database.Password',
            'Database.Port',
            'Database.Name',
        ];

        foreach ($configurationSettings as $setting) {
            if ($this->configuration->hasConfigurationKey($setting) === false) {
                $this->missingConfiguration[] = $setting;
                $result = false;
            }
        }

        return $result;
    }
872893
public function isConfigured()
    {
        Logger::log('Checking configuration');
        $configured = (count($this->config) > 0);
        if ($configured) {
            foreach (static::$required as $required) {
                if (!array_key_exists($required, $this->config)) {
                    $configured = false;
                    break;
                }
            }
        }
        return $configured || $this->checkTryToSaveConfig() || self::isTest();
    }
67205
public function is_enabled() {
        list($componentname, $varname) = $this->get_config_var_name();

        $value = get_config($componentname, $varname . '_enabled');

        // Search areas are enabled by default.
        if ($value === false) {
            $value = 1;
        }
        return (bool)$value;
    }
884027
public function isEnabled()
    {
        $path = $this->directory.'/'.self::FLAG_FILENAME;
        return (bool)$this->pathHelper->getPublicPath($path);
    }
912580
def is_enabled(self):
        
        if self.name in settings.exclude_rules:
            return False
        elif self.name in settings.rules:
            return True
        elif self.enabled_by_default and ALL_ENABLED in settings.rules:
            return True
        else:
            return False
1127013
public function isAvailable()
    {
        $ok = $this->enabled;

        $now = time();
        if ($ok && !is_null($this->enableFrom)) {
            $ok = $this->enableFrom <= $now;
        }
        if ($ok && !is_null($this->enableUntil)) {
            $ok = $this->enableUntil > $now;
        }

        return $ok;
    }
1195185
protected function isDeletable()
    {
        return
            $this->deletable
            &&
            ! $this->isTrashed()
            &&
            $this->getModelConfiguration()->isDeletable(
                $this->getModel()
            );
    }
127218
public function isPerUserEncryptionEnabled()
    {
        $perUserEncryptionEnabled = false;

        if ($this->settings['per_user_encryption_enabled']) {
            $encryptionMetadata = $this->metadataFactory->getAllMetadata();
            /** @var ClassMetadata $classEncryptionMetadata */
            foreach ($encryptionMetadata as $classEncryptionMetadata) {
                if (self::MODE_PER_USER_SHAREABLE === $classEncryptionMetadata->encryptionMode) {
                    $perUserEncryptionEnabled = true;
                    break;
                }
            }
        }

        return $perUserEncryptionEnabled;
    }
988561
private function _checkConfig() {
        // Check each configuration entry
        if (empty($this->_config) || !is_array($this->_config))
            throw new \InvalidArgumentException("Empty configuration or invalid configuration format");
        else if (empty($this->_config['app']))
            throw new \InvalidArgumentException("Application configuration not specified");
        else if (empty($this->_config['app']['name']))
            throw new \InvalidArgumentException("No application name specified under application configuration");
        else if (empty($this->_config['api']))
            throw new \InvalidArgumentException("Api configuration not specified");
        else if (empty($this->_config['api']['url']))
            throw new \InvalidArgumentException("No url specified under api configuration");
        else if (empty($this->_config['api']['sharedKey']))
            throw new \InvalidArgumentException("No shared key specified under api configuration");
        else if (empty($this->_config['api']['secretKey']))
            throw new \InvalidArgumentException("No secret key specified under api configuration");
    }
224815
public function enabled()
    {
        /* @var $model ActiveRecord */
        $model = new $this->modelClass;
        /** @var ToggableBehavior $toggle */
        if (($toggle = $model->getBehavior('toggable')) === null) {
            throw new InvalidConfigException('Toggable behavior is not enabled on model '.$this->modelClass);
        }

        if (($c = $toggle->enabledAttribute) !== null) {
            $this->andWhere($c);
        } elseif (($c = $toggle->disabledAttribute) !== null) {
            $this->andWhere("NOT $c");
        }

        return $this;
    }
226427
@Override
    public boolean isHAEnabled() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "isHAEnabled");

        final boolean haEnabled = Configuration.HAEnabled();

        if (tc.isEntryEnabled())
            Tr.exit(tc, "isHAEnabled", haEnabled);
        return haEnabled;
    }
1318585
public function isValid()
    {
        $data = $this->toArray();

        $missing = array_diff(self::$REQUIRED_FIELDS, array_keys($data));

        if ($missing) {
            throw new \InvalidArgumentException('Config is missing the following keys: ' . implode(', ', $missing));
        }

        return true;
    }
1069954
protected function _isActionEnabled() {
		$actions = $this->getConfig('actions');
		if (!$actions) {
			return true;
		}

		return in_array($this->getController()->getRequest()->getParam('action'), $actions, true);
	}