PHP Class Sulu\Component\Content\SimpleContentType

Inheritance: implements Sulu\Component\Content\ContentTypeInterface
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Protected Properties

Свойство Type Description
$defaultValue mixed default value if node does not have the property.

Méthodes publiques

Méthode Description
__construct ( $name, $defaultValue = null )
__get ( $property ) magic getter for twig templates.
exportData ( $propertyValue )
getContentData ( Sulu\Component\Content\Compat\PropertyInterface $property )
getDefaultParams ( Sulu\Component\Content\Compat\PropertyInterface $property = null )
getDefaultValue ( )
getName ( ) : string Returns the name of the content type.
getReferencedUuids ( Sulu\Component\Content\Compat\PropertyInterface $property )
getType ( )
getViewData ( Sulu\Component\Content\Compat\PropertyInterface $property )
hasValue ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
importData ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey = null )
read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
remove ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
write ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $userId, $webspaceKey, $languageCode, $segmentKey )

Méthodes protégées

Méthode Description
decodeValue ( mixed $value ) : mixed Decodes value from database.
encodeValue ( mixed $value ) : mixed Prepares value for database.
removeIllegalCharacters ( string $content ) : string Remove illegal characters from content string, else PHPCR would throw an PHPCR\ValueFormatException if an illegal characters is detected.

Method Details

__construct() public méthode

public __construct ( $name, $defaultValue = null )

__get() public méthode

magic getter for twig templates.
public __get ( $property )
$property string name of property

decodeValue() protected méthode

Decodes value from database.
protected decodeValue ( mixed $value ) : mixed
$value mixed
Résultat mixed

encodeValue() protected méthode

Prepares value for database.
protected encodeValue ( mixed $value ) : mixed
$value mixed
Résultat mixed

exportData() public méthode

public exportData ( $propertyValue )

getContentData() public méthode

public getContentData ( Sulu\Component\Content\Compat\PropertyInterface $property )
$property Sulu\Component\Content\Compat\PropertyInterface

getDefaultParams() public méthode

public getDefaultParams ( Sulu\Component\Content\Compat\PropertyInterface $property = null )
$property Sulu\Component\Content\Compat\PropertyInterface

getDefaultValue() public méthode

public getDefaultValue ( )

getName() public méthode

Returns the name of the content type.
public getName ( ) : string
Résultat string

getReferencedUuids() public méthode

public getReferencedUuids ( Sulu\Component\Content\Compat\PropertyInterface $property )
$property Sulu\Component\Content\Compat\PropertyInterface

getType() public méthode

public getType ( )

getViewData() public méthode

public getViewData ( Sulu\Component\Content\Compat\PropertyInterface $property )
$property Sulu\Component\Content\Compat\PropertyInterface

hasValue() public méthode

public hasValue ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface

importData() public méthode

public importData ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey = null )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface

read() public méthode

public read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface

remove() public méthode

public remove ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface

removeIllegalCharacters() protected méthode

Remove illegal characters from content string, else PHPCR would throw an PHPCR\ValueFormatException if an illegal characters is detected.
protected removeIllegalCharacters ( string $content ) : string
$content string
Résultat string

write() public méthode

public write ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $userId, $webspaceKey, $languageCode, $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface

Property Details

$defaultValue protected_oe property

default value if node does not have the property.
protected mixed $defaultValue
Résultat mixed