CSObjectChooser
in package
Represents the API class for the object chooser implementation.
Tags
Table of Contents
- OBJECTCHOOSER_VALUE_CONCATENATOR_AND = 1
- OBJECTCHOOSER_VALUE_CONCATENATOR_OR = 2
- OBJECTCHOOSER_VALUE_CONCATENATOR_UNSUPPORTED = 0
- getClassesFromString() : array<string|int, mixed>
- Returns an array of classes extracted from the data string.
- getConcatenatorFromString() : int
- Returns the concatenator from the string
- getDefinitionsFromString() : array<string|int, mixed>
- Returns the record definitions from the data string in the format provided by the "resolveDataString"-method
- getIdsFromString() : array<string|int, mixed>
- Returns an array of ids extracted from the data string. Important: as the returned array does not contain any class information, this method should not be used for data strings containing mixed object types.
- getRecordIdsFromString() : array<string|int, mixed>
- Resolves data strings like
- getRecordsFromString() : array<string|int, mixed>
- Resolves data strings like
Constants
OBJECTCHOOSER_VALUE_CONCATENATOR_AND
public
mixed
OBJECTCHOOSER_VALUE_CONCATENATOR_AND
= 1
Tags
OBJECTCHOOSER_VALUE_CONCATENATOR_OR
public
mixed
OBJECTCHOOSER_VALUE_CONCATENATOR_OR
= 2
Tags
OBJECTCHOOSER_VALUE_CONCATENATOR_UNSUPPORTED
public
mixed
OBJECTCHOOSER_VALUE_CONCATENATOR_UNSUPPORTED
= 0
Tags
Methods
getClassesFromString()
Returns an array of classes extracted from the data string.
public
static getClassesFromString(string $sString) : array<string|int, mixed>
Parameters
- $sString : string
-
The data string to get classes from.
Tags
Return values
array<string|int, mixed> —List of extracted class names.
getConcatenatorFromString()
Returns the concatenator from the string
public
static getConcatenatorFromString(string $sString) : int
Parameters
- $sString : string
-
Usually a string representation of ObjectChooser values
Tags
Return values
int —The concatentor deduced from the string. This is a constant from family self::OBJECTCHOOSER_VALUE_CONCATENATOR_*. Note: In case the concatenator is not supported by Object Chooser, self::OBJECTCHOOSER_VALUE_CONCATENATOR_UNSUPPORTED is returned.
getDefinitionsFromString()
Returns the record definitions from the data string in the format provided by the "resolveDataString"-method
public
static getDefinitionsFromString(string $sString) : array<string|int, mixed>
Parameters
- $sString : string
-
The data string to get the definitions from.
Tags
Return values
array<string|int, mixed> —The definitions as described in "resolveDataString"-method documentation.
getIdsFromString()
Returns an array of ids extracted from the data string. Important: as the returned array does not contain any class information, this method should not be used for data strings containing mixed object types.
public
static getIdsFromString(string $sString) : array<string|int, mixed>
Also the information about selection type is not included in the result array.
Parameters
- $sString : string
-
The data string to get ids from.
Tags
Return values
array<string|int, mixed> —List of extracted ids.
getRecordIdsFromString()
Resolves data strings like
public
static getRecordIdsFromString(string $sString) : array<string|int, mixed>
Pdmarticle:12,Mamfile:123,User:11
and returns the matching record ids in a nested structure:
array( 'Class1' => array( id1, id2, id3, ... ), 'Class2' => array( id1, id2, id3, ... ) )
Parameters
- $sString : string
-
The data string to resolve.
Tags
Return values
array<string|int, mixed> —The list of resolved record ids.
getRecordsFromString()
Resolves data strings like
public
static getRecordsFromString(string $sString) : array<string|int, mixed>
Pdmarticle:12,Mamfile:123,User:11
and returns the matching records.
Parameters
- $sString : string
-
The data string to resolve.
Tags
Return values
array<string|int, mixed> —The list of resolved records.
