Check if the given preference is enabled or not.

@param string $name preference name
@return bool
766469
private function is_preference_enabled($name) {
        $processor = $this->processor;
        $preferences = $this->preferences;
        $defaultpreferences = get_message_output_default_preferences();

        $checked = false;
        // See if user has touched this preference.
        if (isset($preferences->{$name})) {
            // User has some preferences for this state in the database.
            $checked = isset($preferences->{$name}[$processor->name]);
        } else {
            // User has not set this preference yet, using site default preferences set by admin.
            $defaultpreference = 'message_provider_'.$name;
            if (isset($defaultpreferences->{$defaultpreference})) {
                $checked = (int)in_array($processor->name, explode(',', $defaultpreferences->{$defaultpreference}));
            }
        }

        return $checked;
    }
972955
public function has($name)
    {
        $context = $this->_context;

        if (!$context->started) {
            $this->_start();
        }

        return isset($context->_SESSION[$name]);
    }
300842
public function isCommandEnabled($name)
    {
        if (!empty(self::$config['application']['disabled_commands'])
            && in_array($name, self::$config['application']['disabled_commands'])) {
            return false;
        }
        if (!empty(self::$config['application']['experimental_commands'])
            && in_array($name, self::$config['application']['experimental_commands'])) {
            return !empty(self::$config['experimental']['all_experiments'])
                || (
                    !empty(self::$config['experimental']['enable_commands'])
                    && in_array($name, self::$config['experimental']['enable_commands'])
                );
        }

        return true;
    }
680755
public function __isset($name)
    {
        return isset($this->attributes[$name]) && null !== $this->attributes[$name];
    }
1044887
public function hasOption(string $name) : bool
    {
        return in_array($name, self::$options) || in_array("^$name", self::$options);
    }
729283
public function hasAccess($name)
    {
        $permissions = $this->getPermissions($name);
        $roles       = $this->getRoles($name);

        if ($permissions === null && $roles === null) {
            return null;
        }

        return $this->keeper->hasPermissions($permissions) === true && $this->keeper->hasRoles($roles) === true;
    }
797277
private function is_readonly_property( $name ) {
		return is_string( $name ) && property_exists( $this, 'readonly_properties' ) && in_array( $name, $this->readonly_properties );
	}
1111266
public function isProtected($name)
    {
        $key = $this->getProtectionKey($name);

        if (array_key_exists($key, $this->getProtections())) {
            return (bool) $this->getProtections()[$key];
        }

        return false;
    }
1118903
public static function isSettingSet( string $name ): bool
	{
		return isset(self::$settings[$name]) && !empty(self::$settings[$name]);
	}
863307
public function __isset($name)
	{
		if (method_exists($this, 'get_' . $name) || isset($this->$name))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
1031775
public static function hasBehavior($name) {
		static::_initializeBehaviors();

		try {
			list($model, $class) = static::_classesForBehavior($name);
		} catch (Exception $e) {
			return false;
		}
		return isset(static::$_behaviors[$model][$class]);
	}
90127
public function has($name)
    {
        $value = $this->get($name);

        return isset($value) ? $value : false;
    }
383315
public function hasConfigurator(string $name): bool
    {
        if (isset($this->configurators[$name])) {
            return true;
        }

        if (isset($this->serviceIds[$name])) {
            return true;
        }

        return class_exists($name) && \in_array(FieldSetConfigurator::class, class_implements($name), true);
    }
893041
public function isEnabled($name)
    {
        foreach ($this->modules as $module) {
            if ($name === $module->title) {
                return true;
            }
        }
        return false;
    }
1035324
private function _checkOption($name)
    {
        if ($name == 'list')
            return true;

        $names = [
            'store' => 'add',
            'update' => 'edit',
            'delete' => 'delete',
            'order' => 'order',
            'export' => 'export'
        ];

        return $this->crudeSetup->haveOption($names[$name]);
    }
626243
public function hasExtraConfiguration($name)
    {
        $name = $this->resolveString($name, __METHOD__);

        return isset($this->extraConfiguration[$name]);
    }
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;
    }