PHP Class Neos\Neos\Aspects\NodeTypeConfigurationEnrichmentAspect

Show file Open project: neos/neos-development-collection

Protected Properties

Property Type Description
$dataTypesDefaultConfiguration array
$editorDefaultConfiguration array
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$translator Neos\Flow\I18n\Translator

Public Methods

Method Description
enrichNodeTypeConfiguration ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : void

Protected Methods

Method Description
addEditorDefaultsToNodeTypeConfiguration ( string $nodeTypeName, array &$configuration ) : void
addLabelsToNodeTypeConfiguration ( string $nodeTypeName, array &$configuration ) : void
applyInspectorEditorLabels ( string $nodeTypeLabelIdPrefix, string $propertyName, array &$propertyConfiguration ) : void
generateNodeTypeLabelIdPrefix ( string $nodeTypeName ) : string Generates a label prefix for a specific node type with this format: "Vendor_Package:NodeTypes.NodeTypeName"
getInspectorElementTranslationId ( string $nodeTypeSpecificPrefix, string $elementType, string $elementName ) : string Generates a generic inspector element label with the given $nodeTypeSpecificPrefix.
getPropertyConfigurationTranslationId ( string $nodeTypeSpecificPrefix, string $propertyName, string $labelPath ) : string Generates a property configuration-label with the given $nodeTypeSpecificPrefix.
getPropertyLabelTranslationId ( string $nodeTypeSpecificPrefix, string $propertyName ) : string Generates a property label with the given $nodeTypeSpecificPrefix.
resolveHelpMessageThumbnail ( string $nodeTypeName, string $configurationThumbnail ) : string Resolve help message thumbnail url
setGlobalUiElementLabels ( $nodeTypeName, array &$configuration ) : void Sets labels for global NodeType elements like tabs and groups and the general label.
setPropertyLabels ( $nodeTypeName, array &$configuration ) : void
shouldFetchTranslation ( array $parentConfiguration, string $fieldName = 'label' ) : boolean Should a label be generated for the given field or is there something configured?
splitIdentifier ( string $id ) : array Splits an identifier string of the form PackageKey:id or PackageKey:Source:id into an array with the keys id, source and packageKey.

Method Details

addEditorDefaultsToNodeTypeConfiguration() protected method

protected addEditorDefaultsToNodeTypeConfiguration ( string $nodeTypeName, array &$configuration ) : void
$nodeTypeName string
$configuration array
return void

addLabelsToNodeTypeConfiguration() protected method

protected addLabelsToNodeTypeConfiguration ( string $nodeTypeName, array &$configuration ) : void
$nodeTypeName string
$configuration array
return void

applyInspectorEditorLabels() protected method

protected applyInspectorEditorLabels ( string $nodeTypeLabelIdPrefix, string $propertyName, array &$propertyConfiguration ) : void
$nodeTypeLabelIdPrefix string
$propertyName string
$propertyConfiguration array
return void

enrichNodeTypeConfiguration() public method

public enrichNodeTypeConfiguration ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : void
$joinPoint Neos\Flow\Aop\JoinPointInterface
return void

generateNodeTypeLabelIdPrefix() protected method

Generates a label prefix for a specific node type with this format: "Vendor_Package:NodeTypes.NodeTypeName"
protected generateNodeTypeLabelIdPrefix ( string $nodeTypeName ) : string
$nodeTypeName string
return string

getInspectorElementTranslationId() protected method

Generates a generic inspector element label with the given $nodeTypeSpecificPrefix.
protected getInspectorElementTranslationId ( string $nodeTypeSpecificPrefix, string $elementType, string $elementName ) : string
$nodeTypeSpecificPrefix string
$elementType string
$elementName string
return string

getPropertyConfigurationTranslationId() protected method

Generates a property configuration-label with the given $nodeTypeSpecificPrefix.
protected getPropertyConfigurationTranslationId ( string $nodeTypeSpecificPrefix, string $propertyName, string $labelPath ) : string
$nodeTypeSpecificPrefix string
$propertyName string
$labelPath string
return string

getPropertyLabelTranslationId() protected method

Generates a property label with the given $nodeTypeSpecificPrefix.
protected getPropertyLabelTranslationId ( string $nodeTypeSpecificPrefix, string $propertyName ) : string
$nodeTypeSpecificPrefix string
$propertyName string
return string

resolveHelpMessageThumbnail() protected method

Resolve help message thumbnail url
protected resolveHelpMessageThumbnail ( string $nodeTypeName, string $configurationThumbnail ) : string
$nodeTypeName string
$configurationThumbnail string
return string $thumbnailUrl

setGlobalUiElementLabels() protected method

Sets labels for global NodeType elements like tabs and groups and the general label.
protected setGlobalUiElementLabels ( $nodeTypeName, array &$configuration ) : void
$configuration array
return void

setPropertyLabels() protected method

protected setPropertyLabels ( $nodeTypeName, array &$configuration ) : void
$configuration array
return void

shouldFetchTranslation() protected method

Should a label be generated for the given field or is there something configured?
protected shouldFetchTranslation ( array $parentConfiguration, string $fieldName = 'label' ) : boolean
$parentConfiguration array
$fieldName string Name of the possibly existing subfield
return boolean

splitIdentifier() protected method

Splits an identifier string of the form PackageKey:id or PackageKey:Source:id into an array with the keys id, source and packageKey.
protected splitIdentifier ( string $id ) : array
$id string translation id with possible package and source parts
return array

Property Details

$dataTypesDefaultConfiguration protected property

protected array $dataTypesDefaultConfiguration
return array

$editorDefaultConfiguration protected property

protected array $editorDefaultConfiguration
return array

$resourceManager protected property

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
return Neos\Flow\ResourceManagement\ResourceManager

$translator protected property

protected Translator,Neos\Flow\I18n $translator
return Neos\Flow\I18n\Translator