class UCMType implements UCM

UCM Class for handling content types

Properties

UCMType $type The UCM Type

Methods

__construct( string $alias = null, JDatabaseDriver $database = null, BaseApplication $application = null)

Class constructor

object
getType( integer $pk = null)

Get the Content Type

object
getTypeByAlias( string $typeAlias = null)

Get the Content Type from the alias

mixed
getTypeByTable( string $tableName)

Get the Content Type from the table class name

mixed
getTypeId( string $alias = null)

Retrieves the UCM type ID

mixed
fieldmapExpand( boolean $assoc = false)

Method to expand the field mapping

string
__get( string $ucmField)

Magic method to get the name of the field mapped to a ucm field (core_something).

Details

__construct( string $alias = null, JDatabaseDriver $database = null, BaseApplication $application = null)

Class constructor

Parameters

string $alias The alias for the item
JDatabaseDriver $database The database object
BaseApplication $application The application object

object getType( integer $pk = null)

Get the Content Type

Parameters

integer $pk The primary key of the alias type

Return Value

object The UCM Type data

object getTypeByAlias( string $typeAlias = null)

Get the Content Type from the alias

Parameters

string $typeAlias The alias for the type

Return Value

object The UCM Type data

mixed getTypeByTable( string $tableName)

Get the Content Type from the table class name

Parameters

string $tableName The table for the type

Return Value

mixed The UCM Type data if found, false if no match is found

mixed getTypeId( string $alias = null)

Retrieves the UCM type ID

Parameters

string $alias The string of the type alias

Return Value

mixed The ID of the requested type or false if type is not found

mixed fieldmapExpand( boolean $assoc = false)

Method to expand the field mapping

Parameters

boolean $assoc True to return an associative array.

Return Value

mixed Array or object with field mappings. Defaults to object.

string __get( string $ucmField)

Magic method to get the name of the field mapped to a ucm field (core_something).

Parameters

string $ucmField The name of the field in JTableCorecontent

Return Value

string The name mapped to the $ucmField for a given content type