Nextcloud PHP API (master)

ISharePropertyTypeModifyValue extends ISharePropertyType

Tags
since
35.0.0
Attributes
#[Implementable]
$since: '35.0.0'

Table of Contents

Methods

format()  : SharingPropertyBoolean|SharingPropertyDate|SharingPropertyEnum|SharingPropertyPassword|SharingPropertyString
getDefaultValue()  : string|null
The default value if the user hasn't provided one.
getDisplayName()  : non-empty-string
Returns a user friendly display name for this property.
getHint()  : non-empty-string|null
Returns a user friendly hint for this property.
getPriority()  : int<1, 100>
Returns a priority used for sorting the properties for the user interface.
isAdvanced()  : bool
Whether clients should show it in the advanced settings section.
isRequired()  : bool
Whether this property is required to be set.
modifyValueOnLoad()  : string|null
Modify the value whenever a share is fetched from the database.
modifyValueOnSave()  : string|null
Modify the value whenever a share is created or updated in the database.
validateValue()  : true|string
Validates the value when the share is created or updated in the database.

Methods

format()

public format(SharingProperty $property) : SharingPropertyBoolean|SharingPropertyDate|SharingPropertyEnum|SharingPropertyPassword|SharingPropertyString
Parameters
$property : SharingProperty
Tags
since
35.0.0
Return values
SharingPropertyBoolean|SharingPropertyDate|SharingPropertyEnum|SharingPropertyPassword|SharingPropertyString

getDisplayName()

Returns a user friendly display name for this property.

public getDisplayName(IFactory $l10nFactory) : non-empty-string
Parameters
$l10nFactory : IFactory
Tags
since
35.0.0
Return values
non-empty-string

getHint()

Returns a user friendly hint for this property.

public getHint(IFactory $l10nFactory) : non-empty-string|null
Parameters
$l10nFactory : IFactory
Tags
since
35.0.0
Return values
non-empty-string|null

getPriority()

Returns a priority used for sorting the properties for the user interface.

public getPriority() : int<1, 100>

A higher value means the property will be shown further up in the list of properties.

Tags
since
35.0.0
Return values
int<1, 100>

isAdvanced()

Whether clients should show it in the advanced settings section.

public isAdvanced() : bool
Tags
since
35.0.0
Return values
bool

isRequired()

Whether this property is required to be set.

public isRequired() : bool
Tags
since
35.0.0
Return values
bool

modifyValueOnLoad()

Modify the value whenever a share is fetched from the database.

public modifyValueOnLoad(string|null $value) : string|null
Parameters
$value : string|null
Tags
since
35.0.0
Return values
string|null

modifyValueOnSave()

Modify the value whenever a share is created or updated in the database.

public modifyValueOnSave(string|null $oldValue, string|null $newValue) : string|null

The value has been passed to self::validateValue() before the invocation of this method.

Parameters
$oldValue : string|null
$newValue : string|null
Tags
since
35.0.0
Return values
string|null

validateValue()

Validates the value when the share is created or updated in the database.

public validateValue(IFactory $l10nFactory, string $value) : true|string

Returns a user friendly error message if the value is not valid.

Parameters
$l10nFactory : IFactory
$value : string
Tags
since
35.0.0
Return values
true|string
On this page

Search results