abstract class ContentType implements ContentTypeInterface

Content type abstract class

Properties

protected array $fields Content fields
protected array $actionHandlers Set action handlers
protected string $name Content type name
protected string|null $title Content type title
protected string|null $category Category

Methods

void
define()

Definie content type

__construct()

Constructor

string
getClass()

Get class name

void
setActionHandlers(array $handlers)

Set action handlers

array
getActionHandlers()

Get action handlers list

string|null
getCategory()

Get content type category

string
getName()

Get content type name

string|null
getTitle()

Get content type title

array
getActions()

Resolve action handlers (create array with actions object)

array
getFields()

Get content type fields

FieldInterface|null
getField(string $name)

Get field

void
setTitle(string $title)

Set title

void
addField(string $name, string $type, string|null $title = null)

Add field

void
addActionHandler(string $class)

Add action class

void
setName(string $name)

Set name

void
setCategory(string|null $category)

Set category

Details

at line 61
abstract protected void define()

Definie content type

Return Value

void

at line 66
__construct()

Constructor

at line 74
string getClass()

Get class name

Return Value

string

at line 85
void setActionHandlers(array $handlers)

Set action handlers

Parameters

array $handlers

Return Value

void

at line 95
array getActionHandlers()

Get action handlers list

Return Value

array

at line 105
string|null getCategory()

Get content type category

Return Value

string|null

at line 115
string getName()

Get content type name

Return Value

string

at line 125
string|null getTitle()

Get content type title

Return Value

string|null

at line 135
array getActions()

Resolve action handlers (create array with actions object)

Return Value

array

at line 151
array getFields()

Get content type fields

Return Value

array

at line 162
FieldInterface|null getField(string $name)

Get field

Parameters

string $name

Return Value

FieldInterface|null

at line 173
void setTitle(string $title)

Set title

Parameters

string $title

Return Value

void

at line 186
protected void addField(string $name, string $type, string|null $title = null)

Add field

Parameters

string $name
string $type
string|null $title

Return Value

void

at line 199
protected void addActionHandler(string $class)

Add action class

Parameters

string $class

Return Value

void

at line 212
protected void setName(string $name)

Set name

Parameters

string $name

Return Value

void

at line 223
protected void setCategory(string|null $category)

Set category

Parameters

string|null $category

Return Value

void