ContentProviderInterface
in
Content provider interface
Table of Contents
Methods
- createItem() : array<string|int, mixed>|null
- Create new content item
- getContent() : array<string|int, mixed>|null
- Get content
- getContentItems() : mixed
- Get content list
- getContentType() : ContentTypeInterface|null
- Get content type
- 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
- Get content type
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>|nullgetContent()
Get content
public
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>|nullgetContentItems()
Get content list
public
getContentItems([mixed|null $filter = null ][, int $page = 1 ][, int $perPage = 20 ]) : mixed
Parameters
- $filter : mixed|null = null
- $page : int = 1
- $perPage : int = 20
getContentType()
Get content type
public
getContentType() : ContentTypeInterface|null
Return values
ContentTypeInterface|nullgetProviderCategory()
Get provider category
public
getProviderCategory() : string|null
Return values
string|nullgetProviderName()
Get provider name
public
getProviderName() : string
Return values
stringgetProviderTitle()
Get provider title
public
getProviderTitle() : string|null
Return values
string|nullgetSupportedContentTypes()
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
boolsetContentType()
Get content type
public
setContentType(ContentTypeInterface $contentType) : void
Parameters
- $contentType : ContentTypeInterface