Contentserv PHP API

CSItemApi
in package

Tags

Table of Contents

$ENUM_SORTALGOS_FORMATTED  : mixed
$ENUM_SORTTYPES_DESC  : mixed
$tableApiClass  : string
$tableRowApiClass  : string
__construct()  : mixed
getApiFieldForExternalKey()  : CSItemApiField
Returns a specific field of an item or an empty Api Field when the key is null, empty or invalid
getComparator()  : CSItemComparator
Creates a comparator object that can be used with the CSGuiItemComparatorTable
getInstance()  : mixed
getSearchableApiFields()  : mixed
Returns an array with CSItemApiField matching the searchable condition in the given sort order and limit If $returnSimpleSearchables and $returnExtendedSearchables are set to false all fields are returned which are not searchable Otherwise the fields are returned matching at least one of the set criterias.
getValueGetter()  : CSItemValueGetter
Returns a new CSItemValueGetter object
getValueSetter()  : CSItemValueSetter
Returns a new CSItemValueSetter object
getValuesGetter()  : CSItemValuesGetter
Returns a new CSItemValuesGetter object
getValuesSetter()  : CSItemValuesSetter
Returns a new CSItemValuesSetter object
limitAllowedHtmlTags()  : mixed
Limits all tags which are allowed in the formatted value result of any item This can e.g. be used for media neutral exports where not all html tags are supported

Properties

$ENUM_SORTALGOS_FORMATTED

public static mixed $ENUM_SORTALGOS_FORMATTED = array(\CS_SORT_FORMATTED_ASC => 'GUI_EDIT_SORT_FORMATTED_ASC', \CS_SORT_FORMATTED_DESC => 'GUI_EDIT_SORT_FORMATTED_DESC')
Tags

$ENUM_SORTTYPES_DESC

public static mixed $ENUM_SORTTYPES_DESC = array(\CS_SORT_NUMERICAL_DESC => 'GUI_EDIT_SORT_NUMERICAL_DESC', \CS_SORT_CASE_STRING_DESC => 'GUI_EDIT_SORT_CASE_STRING_DES', \CS_SORT_FORMATTED_DESC => 'GUI_EDIT_SORT_FORMATTED_DESC', \CS_SORT_STRING_DESC => 'GUI_EDIT_SORT_STRING_DESC', \CS_SORT_DATE_DESC => 'GUI_EDIT_SORT_DATE_DESC', \CS_SORT_DEFAULT_DESC => 'GUI_EDIT_SORT_DEFAULT_DESC')
Tags

$tableApiClass

public string $tableApiClass
Tags

$tableRowApiClass

public string $tableRowApiClass
Tags

Methods

__construct()

public __construct([mixed $itemClass = null ]) : mixed
Parameters
$itemClass : mixed = null
Tags
Return values
mixed

getApiFieldForExternalKey()

Returns a specific field of an item or an empty Api Field when the key is null, empty or invalid

public getApiFieldForExternalKey(string $sExternalKey) : CSItemApiField

If you pass the ExternalKey of the field as identifier be aware that labels are not unique and the first field with that label will be returned.

Parameters
$sExternalKey : string

External key of the Item (or Field)

Tags
access

public

Return values
CSItemApiField

Returns an instance of the CSItemApiField object

getComparator()

Creates a comparator object that can be used with the CSGuiItemComparatorTable

public getComparator(CSItemComparatorData $oComparatorData) : CSItemComparator
Parameters
$oComparatorData : CSItemComparatorData

CSItemComparatorData object with already setted data.

Tags
access

public

Return values
CSItemComparator

the newly created CSItemComparator-object that can be used for further configuration.

getInstance()

public static getInstance(mixed $apiName[, mixed $itemClass = null ]) : mixed
Parameters
$apiName : mixed
$itemClass : mixed = null
Tags
Return values
mixed

getSearchableApiFields()

Returns an array with CSItemApiField matching the searchable condition in the given sort order and limit If $returnSimpleSearchables and $returnExtendedSearchables are set to false all fields are returned which are not searchable Otherwise the fields are returned matching at least one of the set criterias.

public getSearchableApiFields([bool $returnSimpleSearchables = true ][, bool $returnExtendedSearchables = true ][, string $sortorder = '' ][, mixed $limit = '' ]) : mixed
Parameters
$returnSimpleSearchables : bool = true

whether simple searchable fields are returned

$returnExtendedSearchables : bool = true

whether extended searchable fields are returned

$sortorder : string = ''

SQL Sort Order

$limit : mixed = ''

either a string which is a SQL limit condition or the integer 1, if only the first matching CSItemApiField should be returned

Tags
access

public

Return values
mixed

either an array with the CSItemApiFields or the first CSItemApiField, if limit is set to 1

getValueGetter()

Returns a new CSItemValueGetter object

public static getValueGetter(mixed $mName) : CSItemValueGetter
Parameters
$mName : mixed

The name of the attribute to retrieve

Tags
Return values
CSItemValueGetter

getValueSetter()

Returns a new CSItemValueSetter object

public static getValueSetter(mixed $mName, mixed $mValue) : CSItemValueSetter
Parameters
$mName : mixed

The name of the attribute to retrieve

$mValue : mixed
Tags
Return values
CSItemValueSetter

getValuesGetter()

Returns a new CSItemValuesGetter object

public static getValuesGetter(array<string|int, mixed> $aNames) : CSItemValuesGetter
Parameters
$aNames : array<string|int, mixed>

List of attributes to be retrieved.

Tags
Return values
CSItemValuesGetter

limitAllowedHtmlTags()

Limits all tags which are allowed in the formatted value result of any item This can e.g. be used for media neutral exports where not all html tags are supported

public static limitAllowedHtmlTags([array<string|int, mixed> $htmlTags = array() ]) : mixed
Parameters
$htmlTags : array<string|int, mixed> = array()

an array containing all allowed HTML Tags. If it is an empty array, no html tags are allowed

Tags
access

public

Return values
mixed

        

Search results