PHP Class Backend\Modules\ContentBlocks\Engine\Model

Deprecation: This isn't needed anymore by switching to doctrine.
Show file Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method Description
copy ( string $from, string $to ) : array Copy content blocks
delete ( integer $id ) Delete an item.
exists ( integer $id, boolean $activeOnly = true ) : boolean Does the item exist.
get ( integer $id ) : array Get all data for a given id.
getMaximumId ( ) : integer Get the maximum id.
getRevision ( integer $id, integer $revisionId ) : array Get all data for a given revision.
getTemplates ( ) : array Get templates.
insert ( array $item ) : integer Add a new item.
update ( array $item ) : integer Update an existing item.

Method Details

copy() public static method

Copy content blocks
Deprecation: use the CopyContentBlocksToOtherLocale command
public static copy ( string $from, string $to ) : array
$from string The language code to copy the content blocks from.
$to string The language code we want to copy the content blocks to.
return array

delete() public static method

Delete an item.
Deprecation: use doctrine instead
public static delete ( integer $id )
$id integer The id of the record to delete.

exists() public static method

Does the item exist.
Deprecation: use doctrine instead
public static exists ( integer $id, boolean $activeOnly = true ) : boolean
$id integer The id of the record to check for existence.
$activeOnly boolean Only check in active items?
return boolean

get() public static method

Get all data for a given id.
Deprecation: use doctrine instead
public static get ( integer $id ) : array
$id integer The id for the record to get.
return array

getMaximumId() public static method

Get the maximum id.
Deprecation:
public static getMaximumId ( ) : integer
return integer

getRevision() public static method

Get all data for a given revision.
Deprecation: use doctrine instead
public static getRevision ( integer $id, integer $revisionId ) : array
$id integer The Id for the item wherefore you want a revision.
$revisionId integer The Id of the revision.
return array

getTemplates() public static method

Get templates.
Deprecation: moved to the FormType
public static getTemplates ( ) : array
return array

insert() public static method

Add a new item.
Deprecation: use doctrine instead
public static insert ( array $item ) : integer
$item array The data to insert.
return integer

update() public static method

Update an existing item.
Deprecation: use doctrine instead
public static update ( array $item ) : integer
$item array The new data.
return integer