PHP Interface Sulu\Component\Content\ContentTypeInterface

Datei anzeigen Open project: sulu/sulu Interface Usage Examples

Public Methods

Method 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 method

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

getDefaultParams() public method

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

getDefaultValue() public method

returns default value of content type.
public getDefaultValue ( ) : mixed
return mixed

getReferencedUuids() public method

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
return array

getTemplate() public method

Returns a template to render a form.
public getTemplate ( ) : string
return string

getType() public method

returns type of ContentType PRE_SAVE or POST_SAVE.
public getType ( ) : integer
return integer

getViewData() public method

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

hasValue() public method

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
return mixed

read() public method

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
return mixed

remove() public method

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 method

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
return mixed