UCMContent

Extends \Joomla\CMS\UCM\UCMBase

Base class for implementing UCM

since

3.1

Methods

__construct

Instantiate the UCMBase.

__construct(string $alias = null, \Joomla\CMS\UCM\UCMType $type = null) 
inherited
since

3.1

Arguments

$alias

stringThe alias string

$type

\Joomla\CMS\UCM\UCMTypeThe type object

delete

Delete content from the Core Content table

delete(mixed $pk, \Joomla\CMS\UCM\UCMType $type = null) : boolean
since

3.1

Arguments

$pk

mixedThe string/array of id's to delete

$type

\Joomla\CMS\UCM\UCMTypeThe content type object

Response

booleanTrue if success

getPrimaryKey

Get the value of the primary key from #__ucm_base

getPrimaryKey(string $typeId, integer $contentItemId) : integer
since

3.1

Arguments

$typeId

stringThe ID for the type

$contentItemId

integerValue of the primary key in the legacy or secondary table

Response

integerThe integer of the primary key

getType

Get the UCM Content type.

getType() : \Joomla\CMS\UCM\UCMType
inherited
since

3.1

Response

\Joomla\CMS\UCM\UCMTypeThe UCM content type

mapBase

Method to map the base ucm fields

mapBase(array $original, \Joomla\CMS\UCM\UCMType $type = null) : array
inherited
since

3.1

Arguments

$original

arrayData array

$type

\Joomla\CMS\UCM\UCMTypeUCM Content Type

Response

arrayData array of UCM mappings

mapData

Map the original content to the Core Content fields

mapData(array $original, \Joomla\CMS\UCM\UCMType $type = null) : array
since

3.1

Arguments

$original

arrayThe original data array

$type

\Joomla\CMS\UCM\UCMTypeType object for this data

Response

array$ucmData The mapped UCM data

save

Method to save the data

save(array $original = null, \Joomla\CMS\UCM\UCMType $type = null) : boolean
since

3.1

Arguments

$original

arrayThe original data to be saved

$type

\Joomla\CMS\UCM\UCMTypeThe UCM Type object

Response

booleantrue

store

Store data to the appropriate table

store(array $data, \Joomla\CMS\Table\TableInterface $table = null, string $primaryKey = null) : boolean
inherited
since

3.1

throws

\Exception

Arguments

$data

arrayData to be stored

$table

\Joomla\CMS\Table\TableInterfaceTable Object

$primaryKey

stringThe primary key name

Response

booleanTrue on success

Properties

table

The related table object

since

3.1

Type(s)

\Joomla\CMS\Table\Table

ucmData

The UCM data array

since

3.1

Type(s)

array

type

The UCM type object

inherited
since

3.1

Type(s)

\Joomla\CMS\UCM\UCMType

alias

The alias for the content table

inherited
since

3.1

Type(s)

string