Contentserv PHP API

CSPms extends CSItemApi
in package

Tags

Table of Contents

VALUE_RANGE_TYPE_ID_TAGS  = -41
$ENUM_SORTALGOS_FORMATTED  : mixed
$ENUM_SORTTYPES_DESC  : mixed
$tableApiClass  : string
$tableRowApiClass  : string
__construct()  : mixed
createClass()  : CSPmsField
Creates a new CSPmsField representing a Class at the targeted position
createField()  : CSPmsField
Creates a new CSPmsField at the targeted position
createProduct()  : CSPmsProduct
Creates a new CSPmsProduct at the targeted position.
createProductFolder()  : CSItemApiItem
Creates a new CSItemApiItem as a folder at the targeted position
createView()  : CSPmsView
Creates a new CSPmsView at the targeted position
createViewFromBookmark()  : CSPmsView
Creates a new View from a CSBookmark
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
getExport()  : CSPmsExport
Loads an existing view for a given ID
getField()  : CSPmsField
Loads an existing field for a given ID
getFieldForExternalKey()  : CSPmsField
Loads an existing CSPmsField.
getFields()  : array<string|int, CSPmsField>
Returns an array with CSPmsFields matching the SQL filter condition in the given sort order and limit
getInstance()  : mixed
getProduct()  : CSPmsProduct
Loads an existing CSPmsProduct.
getProductForExternalKey()  : CSPmsProduct
Loads an existing CSPmsProduct.
getProducts()  : array<string|int, CSPmsProduct>|CSPmsProduct
Returns an array with CSPmsProducts matching the SQL filter condition in the given sort order and limit.
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.
getSearchableFields()  : mixed
Returns an array with CSPmsFields 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
getView()  : CSPmsView
Loads an existing view for a given ID
getViewForExternalKey()  : CSPmsView
Loads an existing CSPmsView.
getViews()  : array<string|int, CSPmsView>|CSPmsView
Returns an array with CSPmsViews matching the SQL filter condition in the given sort order and limit.
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

Constants

VALUE_RANGE_TYPE_ID_TAGS

public mixed VALUE_RANGE_TYPE_ID_TAGS = -41
Tags

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

createClass()

Creates a new CSPmsField representing a Class at the targeted position

public static createClass(string $label[, int $targetID = null ]) : CSPmsField
Parameters
$label : string

the label of the new class

$targetID : int = null

ID of the class folder

Tags
access

public

Return values
CSPmsField

createField()

Creates a new CSPmsField at the targeted position

public static createField(string $label[, int $targetID = null ][, int $position = CSITEM_POSITION_CHILD ][, string $type = 'caption' ][, string $typemodule = 'core' ][, bool $loadTypeFromProject = false ][, bool $isConfiguration = false ]) : CSPmsField
Parameters
$label : string

the label of the new field

$targetID : int = null

ID of the targeted field

$position : int = CSITEM_POSITION_CHILD

position relative to the target field

$type : string = 'caption'

the type of the field

$typemodule : string = 'core'

name of the module the type is defined in

$loadTypeFromProject : bool = false

set this flag if the type is defined in the project

$isConfiguration : bool = false

set this flag to create a configuration

Tags
access

public

Return values
CSPmsField

createProduct()

Creates a new CSPmsProduct at the targeted position.

public static createProduct(string $label[, int $targetID = null ][, int $position = CSITEM_POSITION_CHILD ], int $baseFieldID[, bool $isFolder = false ]) : CSPmsProduct

This is a synonym for the createItem method.

Parameters
$label : string

the label of the new product

$targetID : int = null

ID of the targeted product

$position : int = CSITEM_POSITION_CHILD

position relative to the target product

$baseFieldID : int

the id of the root field of the product

$isFolder : bool = false

set this flag to create a product folder

Tags
access

public

Return values
CSPmsProduct

createProductFolder()

Creates a new CSItemApiItem as a folder at the targeted position

public static createProductFolder(string $label[, int $targetID = null ][, int $position = CSITEM_POSITION_CHILD ], int $baseFieldID) : CSItemApiItem
Parameters
$label : string

the label of the new product folder

$targetID : int = null

ID of the targeted product folder

$position : int = CSITEM_POSITION_CHILD

position relative to the target product folder

$baseFieldID : int

the id of the root field of the product folder

Tags
access

public

Return values
CSItemApiItem

createView()

Creates a new CSPmsView at the targeted position

public static createView(string $label[, int $targetID = null ][, int $position = CSITEM_POSITION_CHILD ], int $baseFieldID[, int $productID = null ][, int $viewType = CSITEM_VIEW_SELF ][, int $iVersion = CSITEM_VIEW_VERSION_NEWEST ]) : CSPmsView
Parameters
$label : string

the label of the new view

$targetID : int = null

ID of the targeted view

$position : int = CSITEM_POSITION_CHILD

position relative to the target view

$baseFieldID : int

the id of the root field of the view

$productID : int = null

the id of the referenced item

$viewType : int = CSITEM_VIEW_SELF

the type of the view which is a CSITEM_VIEW_ constant

$iVersion : int = CSITEM_VIEW_VERSION_NEWEST

Defines the version to use when extending an item. This version can be specified either by using one of the CSITEM_VIEW_VERSION_*-constant or a specific version number.

Tags
access

public

Return values
CSPmsView

createViewFromBookmark()

Creates a new View from a CSBookmark

public static createViewFromBookmark(CSBookmark $bookmark, int $parentID) : CSPmsView
Parameters
$bookmark : CSBookmark

is the CSBookmark to convert to a view

$parentID : int
Tags
access

public

Return values
CSPmsView

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.

getExport()

Loads an existing view for a given ID

public static getExport([int $ID = null ]) : CSPmsExport
Parameters
$ID : int = null

of the view

Tags
access

public

Return values
CSPmsExport

a CSPmsExport object for the given ID

getField()

Loads an existing field for a given ID

public static getField([int $ID = null ]) : CSPmsField
Parameters
$ID : int = null

of the field

Tags
access

public

Return values
CSPmsField

a CSPmsField object for the given ID

getFieldForExternalKey()

Loads an existing CSPmsField.

public static getFieldForExternalKey(string $sExternalKey) : CSPmsField
Parameters
$sExternalKey : string

the external key of the file

Tags
access

public

Return values
CSPmsField

getFields()

Returns an array with CSPmsFields matching the SQL filter condition in the given sort order and limit

public static getFields([string $filter = '1=1' ][, string $sortorder = '' ][, mixed $limit = '' ]) : array<string|int, CSPmsField>
Parameters
$filter : string = '1=1'

SQL Filter condition

$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 CSPmsField should be returned

Tags
access

public

Return values
array<string|int, CSPmsField>

either an array with the CSPmsFields or the first CSPmsField, if limit is set to 1

getInstance()

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

getProduct()

Loads an existing CSPmsProduct.

public static getProduct([int $ID = null ]) : CSPmsProduct

This is a synonym for the getItem method.

Parameters
$ID : int = null

of the item

Tags
access

public

Return values
CSPmsProduct

getProductForExternalKey()

Loads an existing CSPmsProduct.

public static getProductForExternalKey(string $externalKey) : CSPmsProduct
Parameters
$externalKey : string

the external key of the file

Tags
access

public

Return values
CSPmsProduct

getProducts()

Returns an array with CSPmsProducts matching the SQL filter condition in the given sort order and limit.

public static getProducts([string $sFilter = '1=1' ][, string $sSortOrder = '' ][, mixed $mLimit = '' ][, bool $bIgnoreRights = false ]) : array<string|int, CSPmsProduct>|CSPmsProduct

This is a synonym for the getItems method and therefore all special syntax described there can be used.

Parameters
$sFilter : string = '1=1'

SQL Filter condition

$sSortOrder : string = ''

SQL Sort Order

$mLimit : mixed = ''

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

$bIgnoreRights : bool = false

whether the user rights should be ignored. If not only those views are returned the user may view.

Tags
access

public

Return values
array<string|int, CSPmsProduct>|CSPmsProduct

Either an array with the CSPmsProducts or the first CSPmsProduct, if limit is set to 1

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

getSearchableFields()

Returns an array with CSPmsFields 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 getSearchableFields([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

getView()

Loads an existing view for a given ID

public static getView([int $ID = null ]) : CSPmsView
Parameters
$ID : int = null

of the view

Tags
access

public

Return values
CSPmsView

a CSPmsView object for the given ID

getViewForExternalKey()

Loads an existing CSPmsView.

public static getViewForExternalKey(string $sExternalKey) : CSPmsView
Parameters
$sExternalKey : string

the external key of the view

Tags
access

public

Return values
CSPmsView

getViews()

Returns an array with CSPmsViews matching the SQL filter condition in the given sort order and limit.

public static getViews([string $filter = '1=1' ][, string $sortorder = '' ][, mixed $limit = '' ][, bool $ignoreRights = false ]) : array<string|int, CSPmsView>|CSPmsView

This is a synonym for the getViews method and therefore all special syntax described there can be used.

Parameters
$filter : string = '1=1'

SQL Filter condition, where there are only simple filter conditions like ID or ParentID are allowed.

$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 CSPmsView should be returned

$ignoreRights : bool = false

whether the user rights should be ignored. If not only those views are returned the user may view.

Tags
access

public

Return values
array<string|int, CSPmsView>|CSPmsView

either an array with the CSPmsViews or the first CSPmsView, if limit is set to 1

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