Arikaim CMS

ContentProvider

Content provider trait

Table of Contents

Methods

createItem()  : array<string|int, mixed>|null
Create new content item
get()  : ContentItemInterface|null
Get content
getClass()  : string
Get class name
getContentItems()  : mixed|null
Get content list
getContentType()  : ContentTypeInterface|null
Get supported content type
getItemsCount()  : int|null
Get total data items
getProviderCategory()  : string|null
Get provider category
getProviderName()  : string
Get provider name
getProviderTitle()  : string|null
Get provider title
getSupportedContentTypes()  : array<string|int, mixed>
Get supported content types
saveItem()  : bool
Save content item
setContentType()  : void
Set content type
updateOrCreate()  : mixed
Update or create data item

Methods

createItem()

Create new content item

public createItem(array<string|int, mixed> $data[, string|null $contentType = null ]) : array<string|int, mixed>|null
Parameters
$data : array<string|int, mixed>
$contentType : string|null = null

Content type name

Return values
array<string|int, mixed>|null

get()

Get content

public get(mixed $key) : ContentItemInterface|null
Parameters
$key : mixed

Id, Uuid or content name slug

Return values
ContentItemInterface|null

getClass()

Get class name

public getClass() : string
Return values
string

getContentItems()

Get content list

public getContentItems([mixed|null $filter = null ][, int $page = 1 ][, int $perPage = 20 ]) : mixed|null
Parameters
$filter : mixed|null = null
$page : int = 1
$perPage : int = 20
Return values
mixed|null

getItemsCount()

Get total data items

public getItemsCount() : int|null
Return values
int|null

getProviderCategory()

Get provider category

public getProviderCategory() : string|null
Return values
string|null

getProviderName()

Get provider name

public getProviderName() : string
Tags
throws
Exception
Return values
string

getProviderTitle()

Get provider title

public getProviderTitle() : string|null
Return values
string|null

getSupportedContentTypes()

Get supported content types

public getSupportedContentTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

saveItem()

Save content item

public saveItem(string|int $key, array<string|int, mixed> $data[, string|null $contentType = null ]) : bool
Parameters
$key : string|int
$data : array<string|int, mixed>
$contentType : string|null = null

Content type name

Return values
bool

updateOrCreate()

Update or create data item

public updateOrCreate(mixed $key, array<string|int, mixed> $data[, string|null $contentType = null ]) : mixed
Parameters
$key : mixed
$data : array<string|int, mixed>
$contentType : string|null = null

        
On this page

Search results