PHP Interface Sulu\Component\Content\Document\Structure\StructureInterface

Inheritance: extends ArrayAccess
Exibir arquivo Open project: sulu/sulu

Public Methods

Method Description
bind ( array $data, boolean $clearMissing = false ) Bind data to the container.
commitStagedData ( boolean $clearMissingContent ) Commit the staged content data.
getContentViewProperty ( string $name ) : PropertyValue Return the named property as rendered by the content type ->getContentData() method.
getProperty ( string $name ) : PropertyValue Return the named property.
getStagedData ( ) : array Get staged data, see documentation for commitStagedData.
hasProperty ( string $name ) Return true if the container has the named property.
setStagedData ( array $stagedData ) Set staged data, see documentation for commitStagedData.
toArray ( ) : array Return an array representation of the containers property values.

Method Details

bind() public method

If $clearMissing is true then any missing fields will be set to NULL.
public bind ( array $data, boolean $clearMissing = false )
$data array
$clearMissing boolean

commitStagedData() public method

This is necessary because: - We cannot set the content data on a property-by-property basis - Therefore the form framework needs to get/set to a specific property - It uses the stagedData property for this purpose - We then "commit" the staged data after the form has been submitted. We should refactor the content types so that they are not involved in the process of mapping to PHPCR. If $clearMissingContent is true, then fields will be set to NULL
public commitStagedData ( boolean $clearMissingContent )
$clearMissingContent boolean

getContentViewProperty() public method

Return the named property as rendered by the content type ->getContentData() method.
public getContentViewProperty ( string $name ) : PropertyValue
$name string
return PropertyValue

getProperty() public method

Return the named property.
public getProperty ( string $name ) : PropertyValue
$name string
return PropertyValue

getStagedData() public method

Get staged data, see documentation for commitStagedData.
public getStagedData ( ) : array
return array

hasProperty() public method

Return true if the container has the named property.
public hasProperty ( string $name )
$name string

setStagedData() public method

Set staged data, see documentation for commitStagedData.
public setStagedData ( array $stagedData )
$stagedData array

toArray() public method

Return an array representation of the containers property values.
public toArray ( ) : array
return array