PHP Interface Sulu\Component\Content\ContentTypeInterface

Afficher le fichier Open project: sulu/sulu Interface Usage Examples

Méthodes publiques

Méthode Description
getContentData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array Prepare content data for the template.
getDefaultParams ( Sulu\Component\Content\Compat\PropertyInterface $property = null ) : array Returns default parameters.
getDefaultValue ( ) : mixed returns default value of content type.
getReferencedUuids ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array Return the UUIDs that are referenced by this content type for the given PropertyInterface instance.
getTemplate ( ) : string Returns a template to render a form.
getType ( ) : integer returns type of ContentType PRE_SAVE or POST_SAVE.
getViewData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array Prepare view data (or metadata) for the template.
hasValue ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey ) : mixed Checks availability of a value.
read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed Reads the value for given property from the content repository then sets the value of the Sulu property.
remove ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey ) Remove the Sulu property from given repository node.
write ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, integer $userId, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed Save the value from given property.

Method Details

getContentData() public méthode

Prepare content data for the template.
public getContentData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Résultat array

getDefaultParams() public méthode

Returns default parameters.
public getDefaultParams ( Sulu\Component\Content\Compat\PropertyInterface $property = null ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Résultat array

getDefaultValue() public méthode

returns default value of content type.
public getDefaultValue ( ) : mixed
Résultat mixed

getReferencedUuids() public méthode

Return the UUIDs that are referenced by this content type for the given PropertyInterface instance.
public getReferencedUuids ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Résultat array

getTemplate() public méthode

Returns a template to render a form.
public getTemplate ( ) : string
Résultat string

getType() public méthode

returns type of ContentType PRE_SAVE or POST_SAVE.
public getType ( ) : integer
Résultat integer

getViewData() public méthode

Prepare view data (or metadata) for the template.
public getViewData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Résultat array

hasValue() public méthode

Checks availability of a value.
public hasValue ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey ) : mixed
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$webspaceKey
$languageCode
$segmentKey
Résultat mixed

read() public méthode

Reads the value for given property from the content repository then sets the value of the Sulu property.
public read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$webspaceKey string
$languageCode string
$segmentKey string
Résultat mixed

remove() public méthode

Remove the Sulu property from given repository node.
public remove ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$webspaceKey string
$languageCode string
$segmentKey string

write() public méthode

Save the value from given property.
public write ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, integer $userId, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$userId integer
$webspaceKey string
$languageCode string
$segmentKey string
Résultat mixed