.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.preferences.PluginsSetting Class Reference
+ Inheritance diagram for searx.preferences.PluginsSetting:
+ Collaboration diagram for searx.preferences.PluginsSetting:

Public Member Functions

 __init__ (self, default_value, Iterable[Plugin] plugins)
 
 transform_form_items (self, items)
 
- Public Member Functions inherited from searx.preferences.BooleanChoices
 transform_values (self, values)
 
 parse_cookie (self, str data_disabled, str data_enabled)
 
 parse_form (self, List[str] items)
 
 enabled (self)
 
 disabled (self)
 
 save (self, flask.Response resp)
 
 get_disabled (self)
 
 get_enabled (self)
 

Additional Inherited Members

- Public Attributes inherited from searx.preferences.BooleanChoices
 name = name
 
 choices = choices
 
 locked = locked
 
 default_choices = dict(choices)
 
bool choices = False
 
 disabled
 
 enabled
 

Detailed Description

Plugin settings

Definition at line 312 of file preferences.py.

Constructor & Destructor Documentation

◆ __init__()

searx.preferences.PluginsSetting.__init__ ( self,
default_value,
Iterable[Plugin] plugins )

Reimplemented from searx.preferences.BooleanChoices.

Definition at line 315 of file preferences.py.

315 def __init__(self, default_value, plugins: Iterable[Plugin]):
316 super().__init__(default_value, {plugin.id: plugin.default_on for plugin in plugins})
317

References searx.preferences.PluginsSetting.__init__().

Referenced by searx.preferences.PluginsSetting.__init__().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ transform_form_items()

searx.preferences.PluginsSetting.transform_form_items ( self,
items )

Reimplemented from searx.preferences.BooleanChoices.

Definition at line 318 of file preferences.py.

318 def transform_form_items(self, items):
319 return [item[len('plugin_') :] for item in items]
320
321

Referenced by searx.preferences.BooleanChoices.parse_form().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: