PHP Class Sulu\Component\Content\Extension\AbstractExtension

Inheritance: implements Sulu\Component\Content\Extension\ExtensionInterface
Show file Open project: sulu/sulu Class Usage Examples

Protected Properties

Property Type Description
$additionalPrefix string additional prefix for properties.
$name string name of extension.
$properties string[]

Public Methods

Method Description
getContentData ( $container )
getFieldMapping ( )
getName ( )
setLanguageCode ( $languageCode, $languageNamespace, $namespace )

Protected Methods

Method Description
getPropertyName ( $propertyName ) : string returns translated property name.
loadProperty ( PHPCR\NodeInterface $node, string $name, string $default = '' ) : mixed load a single property value.
saveProperty ( PHPCR\NodeInterface $node, array $data, string $name, string $default = '' ) save a single property value.

Method Details

getContentData() public method

public getContentData ( $container )

getFieldMapping() public method

public getFieldMapping ( )

getName() public method

public getName ( )

getPropertyName() protected method

returns translated property name.
protected getPropertyName ( $propertyName ) : string
$propertyName
return string

loadProperty() protected method

load a single property value.
protected loadProperty ( PHPCR\NodeInterface $node, string $name, string $default = '' ) : mixed
$node PHPCR\NodeInterface
$name string name of property in node
$default string value if no property exists with given name
return mixed

saveProperty() protected method

save a single property value.
protected saveProperty ( PHPCR\NodeInterface $node, array $data, string $name, string $default = '' )
$node PHPCR\NodeInterface
$data array data array
$name string name of property in node an data array
$default string value if no data exists with given name

setLanguageCode() public method

public setLanguageCode ( $languageCode, $languageNamespace, $namespace )

Property Details

$additionalPrefix protected property

additional prefix for properties.
protected string $additionalPrefix
return string

$name protected property

name of extension.
protected string $name
return string

$properties protected property

protected string[] $properties
return string[]