Contentserv PHP API

CSTypeUtils
in package

Tags

Table of Contents

FILTER_INHERITED  = 'Inherited'
FILTER_INVERTED  = 'Inverted'
FILTER_SELECTED  = 'Selected'
getAllFileCSTypes()  : array<string|int, mixed>
Gets all cstype defined in the admin/admin.local and project environment
getClassName()  : string
Returns the class name of a path file or a CSType object
getCSType()  : object
Gets the CSType object for a CSType path and if the path does not exists the CSType object will be returned.
getCSTypeAttributes()  : string
Make a HTML for the CSTypeChooser content
getCSTypesInFolder()  : array<string|int, mixed>
Returns all CSType in a given folder
getListFilter()  : array<string|int, mixed>
Returns a list filter for types with or without inheritance.
getShortName()  : string
Returns the short name of a CSType e.g. '../admin/core/cstypes/captionCSType.php' => 'caption'
makeList()  : object
Creates a CSPortalGuiList for CSTypeChooser.list.php

Constants

FILTER_INHERITED

public mixed FILTER_INHERITED = 'Inherited'
Tags

FILTER_INVERTED

public mixed FILTER_INVERTED = 'Inverted'
Tags

FILTER_SELECTED

public mixed FILTER_SELECTED = 'Selected'
Tags

Methods

getAllFileCSTypes()

Gets all cstype defined in the admin/admin.local and project environment

public static getAllFileCSTypes() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

getClassName()

Returns the class name of a path file or a CSType object

public static getClassName(mixed $mCSType) : string

e.g. "../admin/core/cstypes/captionCSType.php" return captionCSType

Parameters
$mCSType : mixed

The File path to the CSType.php OR the CSType object

Tags
Return values
string

getCSType()

Gets the CSType object for a CSType path and if the path does not exists the CSType object will be returned.

public static getCSType(string $sCSTypePath) : object

The current CSType will be automatically included!

Parameters
$sCSTypePath : string

The file path to the CSType

Tags
Return values
object

CSType

getCSTypeAttributes()

Make a HTML for the CSTypeChooser content

public static getCSTypeAttributes(object $csType[, null $configuration = NULL ][, string $title = '' ]) : string
Parameters
$csType : object

CSType object

$configuration : null = NULL
$title : string = ''
Tags
Return values
string

getCSTypesInFolder()

Returns all CSType in a given folder

public static getCSTypesInFolder(string $folder) : array<string|int, mixed>
Parameters
$folder : string

A relative path

Tags
Return values
array<string|int, mixed>

getListFilter()

Returns a list filter for types with or without inheritance.

public static getListFilter(array<string|int, mixed>|string $aInheritedTypes[, array<string|int, mixed>|string $aSelectedTypes = array() ][, bool $bInvertFilter = false ]) : array<string|int, mixed>
Parameters
$aInheritedTypes : array<string|int, mixed>|string

An array that minded the inheritance of the types.

$aSelectedTypes : array<string|int, mixed>|string = array()

An array with direct selected types.

$bInvertFilter : bool = false

Whether the complete filter should be inverted.

Tags
Return values
array<string|int, mixed>

getShortName()

Returns the short name of a CSType e.g. '../admin/core/cstypes/captionCSType.php' => 'caption'

public static getShortName(mixed $mCSType) : string
Parameters
$mCSType : mixed

The File path to the CSType.php OR the CSType object

Tags
Return values
string

makeList()

Creates a CSPortalGuiList for CSTypeChooser.list.php

public static makeList(string $currentType, string $class_name[, object $list = NULL ][, array<string|int, mixed> $files = array() ][, string $search = NULL ]) : object

JS Function: setCSType is in CSTypeChooser.list.php defined on the window DOM

Parameters
$currentType : string

The cstype which should be selected onload. Path of the CSType e.g. "../admin/core/cstypes/captionCSType.php"

$class_name : string

A RecordClass e.g. PdmArticle, Mamfile etc...

$list : object = NULL

A list object, usually CSPortalGuiList

$files : array<string|int, mixed> = array()

All possible CSType as an array

$search : string = NULL

An optional search phrase

Tags
Return values
object

Return the list object


        

Search results