ISharePropertyType
in
Tags
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.
- 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
Return values
SharingPropertyBoolean|SharingPropertyDate|SharingPropertyEnum|SharingPropertyPassword|SharingPropertyStringgetDefaultValue()
The default value if the user hasn't provided one.
public
getDefaultValue() : string|null
A default value must be returned, if self::isRequired() returns true.
If the class also implements ISharePropertyTypeModifyValue, ISharePropertyTypeModifyValue::modifyValueOnSave() will be called when the value is saved to the database, but the value will be returned to the user as-is.
Tags
Return values
string|nullgetDisplayName()
Returns a user friendly display name for this property.
public
getDisplayName(IFactory $l10nFactory) : non-empty-string
Parameters
- $l10nFactory : IFactory
Tags
Return values
non-empty-stringgetHint()
Returns a user friendly hint for this property.
public
getHint(IFactory $l10nFactory) : non-empty-string|null
Parameters
- $l10nFactory : IFactory
Tags
Return values
non-empty-string|nullgetPriority()
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
Return values
int<1, 100>isAdvanced()
Whether clients should show it in the advanced settings section.
public
isAdvanced() : bool
Tags
Return values
boolisRequired()
Whether this property is required to be set.
public
isRequired() : bool
Tags
Return values
boolvalidateValue()
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