Nextcloud PHP API (master)

IDeclarativeManager

Tags
since
29.0.0
psalm-import-type

DeclarativeSettingsValueTypes from IDeclarativeSettingsForm

psalm-import-type

DeclarativeSettingsSectionType from IDeclarativeSettingsForm

psalm-import-type

DeclarativeSettingsFormSchemaWithValues from IDeclarativeSettingsForm

psalm-import-type

DeclarativeSettingsFormSchemaWithoutValues from IDeclarativeSettingsForm

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
since
29.0.0
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
since
29.0.0
Return values
array<int, DeclarativeSettingsFormSchemaWithValues>

loadSchemas()

Load all schemas from the registration context and events.

public loadSchemas() : void
Tags
since
29.0.0

registerSchema()

Registers a new declarative settings schema.

public registerSchema(string $app, DeclarativeSettingsFormSchemaWithoutValues $schema) : void
Parameters
$app : string
$schema : DeclarativeSettingsFormSchemaWithoutValues
Tags
since
29.0.0

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
Tags
throws
Exception
throws
NotAdminException
since
29.0.0

        
On this page

Search results