Class

eZ\Publish\Core\MVC\Symfony\Templating\Twig\FieldBlockRenderer

class FieldBlockRenderer implements FieldBlockRendererInterface

Constants

VIEW

EDIT

FIELD_VIEW_SUFFIX

FIELD_EDIT_SUFFIX

FIELD_DEFINITION_VIEW_SUFFIX

FIELD_DEFINITION_EDIT_SUFFIX

Methods

setTwig(Twig_Environment $twig)

setBaseTemplate(string|Twig_Template $baseTemplate)

setFieldViewResources(array $fieldViewResources = null)

setFieldEditResources(array $fieldEditResources = null)

setFieldDefinitionViewResources(array $fieldDefinitionViewResources = null)

setFieldDefinitionEditResources(array $fieldDefinitionEditResources = null)

sortResourcesCallback(array $a, array $b)

string renderContentFieldView(Field $field, string $fieldTypeIdentifier, array $params = array())

Renders the HTML view markup for a given field.

string renderContentFieldEdit(Field $field, string $fieldTypeIdentifier, array $params = array())

Renders the HTML edit markup for a given field.

string renderFieldDefinitionView(FieldDefinition $fieldDefinition, array $params = array())

Renders the HTML view markup for the given field definition.

string renderFieldDefinitionEdit(FieldDefinition $fieldDefinition, array $params = array())

Renders the HTML edot markup for the given field definition.

Details

at line 86
public setTwig(Twig_Environment $twig)

Parameters

Twig_Environment $twig

at line 94
public setBaseTemplate(string|Twig_Template $baseTemplate)

Parameters

string|Twig_Template $baseTemplate

at line 102
public setFieldViewResources(array $fieldViewResources = null)

Parameters

array $fieldViewResources

at line 111
public setFieldEditResources(array $fieldEditResources = null)

Parameters

array $fieldEditResources

at line 120
public setFieldDefinitionViewResources(array $fieldDefinitionViewResources = null)

Parameters

array $fieldDefinitionViewResources

at line 129
public setFieldDefinitionEditResources(array $fieldDefinitionEditResources = null)

Parameters

array $fieldDefinitionEditResources

at line 135
public sortResourcesCallback(array $a, array $b)

Parameters

array $a
array $b

at line 140
public string renderContentFieldView(Field $field, string $fieldTypeIdentifier, array $params = array())

Renders the HTML view markup for a given field.

Parameters

Field $field
string $fieldTypeIdentifier FieldType identifier for $field
array $params An array of parameters to pass to the field view

Return Value

string

Exceptions

InvalidArgumentException If no field with provided $fieldIdentifier can be found in $content.

at line 145
public string renderContentFieldEdit(Field $field, string $fieldTypeIdentifier, array $params = array())

Renders the HTML edit markup for a given field.

Parameters

Field $field
string $fieldTypeIdentifier FieldType identifier for $field
array $params An array of parameters to pass to the field edit view

Return Value

string

Exceptions

InvalidArgumentException If no field with provided $fieldIdentifier can be found in $content.

at line 187
public string renderFieldDefinitionView(FieldDefinition $fieldDefinition, array $params = array())

Renders the HTML view markup for the given field definition.

Parameters

FieldDefinition $fieldDefinition
array $params

Return Value

string

at line 192
public string renderFieldDefinitionEdit(FieldDefinition $fieldDefinition, array $params = array())

Renders the HTML edot markup for the given field definition.

Parameters

FieldDefinition $fieldDefinition
array $params

Return Value

string