IDeclarativeManager
in
Tags
Table of Contents
Methods
- getFormIDs() : array<string, array<int, string>>
- Gets the IDs of the forms for the given type and section.
- getFormsWithValues() : array<int, DeclarativeSettingsFormSchemaWithValues>
- Gets the forms including the field values for the given type and section.
- loadSchemas() : void
- Load all schemas from the registration context and events.
- registerSchema() : void
- Registers a new declarative settings schema.
- setValue() : void
- Sets a value for the given field ID.
Methods
getFormIDs()
Gets the IDs of the forms for the given type and section.
public
getFormIDs(IUser $user, DeclarativeSettingsSectionType $type, string $section) : array<string, array<int, string>>
Parameters
- $user : IUser
- $type : DeclarativeSettingsSectionType
- $section : string
Tags
Return values
array<string, array<int, string>>getFormsWithValues()
Gets the forms including the field values for the given type and section.
public
getFormsWithValues(IUser $user, DeclarativeSettingsSectionType|null $type, string|null $section) : array<int, DeclarativeSettingsFormSchemaWithValues>
Parameters
- $user : IUser
-
Used for reading values from the personal section or for authorization for the admin section.
- $type : DeclarativeSettingsSectionType|null
-
If it is null the forms will not be filtered by type.
- $section : string|null
-
If it is null the forms will not be filtered by section.
Tags
Return values
array<int, DeclarativeSettingsFormSchemaWithValues>loadSchemas()
Load all schemas from the registration context and events.
public
loadSchemas() : void
Tags
registerSchema()
Registers a new declarative settings schema.
public
registerSchema(string $app, DeclarativeSettingsFormSchemaWithoutValues $schema) : void
Parameters
- $app : string
- $schema : DeclarativeSettingsFormSchemaWithoutValues
Tags
setValue()
Sets a value for the given field ID.
public
setValue(IUser $user, string $app, string $formId, string $fieldId, DeclarativeSettingsValueTypes $value) : void
Parameters
- $user : IUser
-
Used for storing values in the personal section or for authorization for the admin section.
- $app : string
- $formId : string
- $fieldId : string
- $value : DeclarativeSettingsValueTypes