class NodeTypeConfigurationEnrichmentAspect (View source)

Properties

protected array $dataTypesDefaultConfiguration
protected array $editorDefaultConfiguration
protected Translator $translator
protected ResourceManager $resourceManager

Methods

void
enrichNodeTypeLabelsConfiguration(JoinPointInterface $joinPoint)

No description

void
addLabelsToNodeTypeConfiguration(string $nodeTypeName, array $configuration, array $declaredSuperTypes)

No description

void
setPropertyLabels($nodeTypeName, array $configuration, array $declaredSuperTypes)

No description

string
resolveHelpMessageThumbnail(string $nodeTypeName, string $configurationThumbnail)

Resolve help message thumbnail url

void
applyEditorLabels(string $nodeTypeLabelIdPrefix, string $propertyName, string $editorName, array $editorOptions, callable $translationIdGenerator)

No description

void
setGlobalUiElementLabels($nodeTypeName, array $configuration)

Sets labels for global NodeType elements like tabs and groups and the general label.

bool
shouldFetchTranslation(array $parentConfiguration, string $fieldName = 'label')

Should a label be generated for the given field or is there something configured?

string
getInspectorElementTranslationId(string $nodeTypeSpecificPrefix, string $elementType, string $elementName)

Generates a generic inspector element label with the given $nodeTypeSpecificPrefix.

string
getPropertyLabelTranslationId(string $nodeTypeSpecificPrefix, string $propertyName)

Generates a property label with the given $nodeTypeSpecificPrefix.

string
getPropertyConfigurationTranslationId(string $nodeTypeSpecificPrefix, string $propertyName, string $labelPath)

Generates a property configuration-label with the given $nodeTypeSpecificPrefix.

string
generateNodeTypeLabelIdPrefix(string $nodeTypeName)

Generates a label prefix for a specific node type with this format: "Vendor_Package:NodeTypes.NodeTypeName"

array
splitIdentifier(string $id)

Splits an identifier string of the form PackageKey:id or PackageKey:Source:id into an array with the keys id, source and packageKey.

Details

void enrichNodeTypeLabelsConfiguration(JoinPointInterface $joinPoint)

No description

Parameters

JoinPointInterface $joinPoint

Return Value

void

protected void addLabelsToNodeTypeConfiguration(string $nodeTypeName, array $configuration, array $declaredSuperTypes)

No description

Parameters

string $nodeTypeName
array $configuration
array $declaredSuperTypes

Return Value

void

protected void setPropertyLabels($nodeTypeName, array $configuration, array $declaredSuperTypes)

No description

Parameters

$nodeTypeName
array $configuration
array $declaredSuperTypes

Return Value

void

protected string resolveHelpMessageThumbnail(string $nodeTypeName, string $configurationThumbnail)

Resolve help message thumbnail url

Parameters

string $nodeTypeName
string $configurationThumbnail

Return Value

string $thumbnailUrl

protected void applyEditorLabels(string $nodeTypeLabelIdPrefix, string $propertyName, string $editorName, array $editorOptions, callable $translationIdGenerator)

No description

Parameters

string $nodeTypeLabelIdPrefix
string $propertyName
string $editorName
array $editorOptions
callable $translationIdGenerator

Return Value

void

protected void setGlobalUiElementLabels($nodeTypeName, array $configuration)

Sets labels for global NodeType elements like tabs and groups and the general label.

Parameters

$nodeTypeName
array $configuration

Return Value

void

protected bool shouldFetchTranslation(array $parentConfiguration, string $fieldName = 'label')

Should a label be generated for the given field or is there something configured?

Parameters

array $parentConfiguration
string $fieldName

Name of the possibly existing subfield

Return Value

bool

protected string getInspectorElementTranslationId(string $nodeTypeSpecificPrefix, string $elementType, string $elementName)

Generates a generic inspector element label with the given $nodeTypeSpecificPrefix.

Parameters

string $nodeTypeSpecificPrefix
string $elementType
string $elementName

Return Value

string

protected string getPropertyLabelTranslationId(string $nodeTypeSpecificPrefix, string $propertyName)

Generates a property label with the given $nodeTypeSpecificPrefix.

Parameters

string $nodeTypeSpecificPrefix
string $propertyName

Return Value

string

protected string getPropertyConfigurationTranslationId(string $nodeTypeSpecificPrefix, string $propertyName, string $labelPath)

Generates a property configuration-label with the given $nodeTypeSpecificPrefix.

Parameters

string $nodeTypeSpecificPrefix
string $propertyName
string $labelPath

Return Value

string

protected string generateNodeTypeLabelIdPrefix(string $nodeTypeName)

Generates a label prefix for a specific node type with this format: "Vendor_Package:NodeTypes.NodeTypeName"

Parameters

string $nodeTypeName

Return Value

string

protected array splitIdentifier(string $id)

Splits an identifier string of the form PackageKey:id or PackageKey:Source:id into an array with the keys id, source and packageKey.

Parameters

string $id

translation id with possible package and source parts

Return Value

array