Arikaim CMS

AbstractContentProvider
in package
implements ContentProviderInterface Uses ContentProvider

AbstractYes

Abstract content provider class

Table of Contents

Interfaces

ContentProviderInterface
Content provider interface

Properties

$contentProviderCategory  : string|null
Content provider category
$contentProviderName  : string
Content provider name
$contentProviderTitle  : string
Content provider title
$contentType  : string
Content type name or handler class

Methods

__construct()  : mixed
Constructor
createItem()  : array<string|int, mixed>|null
Create new content item
get()  : ContentItemInterface|null
Get content
getClass()  : string
Get class name
getContent()  : array<string|int, mixed>|null
Get content
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

Properties

$contentProviderCategory

Content provider category

protected string|null $contentProviderCategory = null

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

getContent()

Get content

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

Id, Uuid or content name slug

$contentType : string|null = null

Content type name

$keyFields : string|array<string|int, mixed>|null = null
Return values
array<string|int, mixed>|null

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