ContentTypeRegistry
class ContentTypeRegistry
Content type registry manager
Traits
Constants
CONTENT_TYPES_FILE_NAME |
Default content types registry config file name |
Properties
protected array | $comments | Config array comments | from PhpConfigFile |
protected array|null | $contentTypes | Content types |
Methods
Export array as text
Constructor
Load content providers and content types
Get registered content types list
Get content type
Check if content type exists
Get all content prioviders for type
Add content type provider
Register content type action
Register content provider
Unregister content provider
Details
in PhpConfigFile at line 33
array|null
include(string $fileName)
Include config file
in PhpConfigFile at line 44
array|null
includePhpArray(string $fileName)
Include php array
in PhpConfigFile at line 62
protected void
setComment(string $comment, string $key)
Set array key comment
in PhpConfigFile at line 73
protected string
getCommentsText(string $key)
Get array imtem comment as text
in PhpConfigFile at line 100
protected string
exportArray(array $data, string $arrayKey, int $currentTab = 1, int $endTab = 1)
Export array as text
in PhpConfigFile at line 144
protected string
exportItem(string $key, mixed $value, int $maxTabs)
Export item as text
in PhpConfigFile at line 158
protected string
exportConfig(array $data)
Export config as text
in PhpConfigFile at line 245
bool
saveConfigFile(string $fileName, array $data)
Save config file
at line 49
__construct(string|null $contentTypesFileName = null)
Constructor
at line 60
void
load(bool $reload = false)
Load content providers and content types
at line 73
array
getContentTypes(string|null $category = null)
Get registered content types list
at line 96
ContentTypeInterface|null
get(string $name)
Get content type
at line 116
bool
has(string $name)
Check if content type exists
at line 127
array|null
getPoviders(string $contentType)
Get all content prioviders for type
at line 145
bool
addProvider(string $contentType, string $name)
Add content type provider
at line 169
bool
registerAction(string $contentType, string $class)
Register content type action
at line 205
bool
register($contentType)
Register content provider
at line 236
bool
unRegister(string $name)
Unregister content provider
at line 256
protected array
resolveDetails(ContentTypeInterface $contentType)
Resolve content type details