PHP Class Sulu\Component\Content\Compat\Block\BlockProperty

Inheritance: extends Sulu\Component\Content\Compat\Property, implements Sulu\Component\Content\Compat\Block\BlockPropertyInterface
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Méthodes publiques

Méthode Description
__clone ( )
__construct ( $name, $metadata, $defaultTypeName, $mandatory = false, $multilingual = false, $maxOccurs = 1, $minOccurs = 1, $params = [], $tags = [], $col = null )
addType ( BlockPropertyType $type ) adds a type.
clearProperties ( ) clears all initialized properties.
doSetValue ( $value ) Sub properties need to be referenced to the PropertyValue so that the "real" property is updated.
getChildProperties ( string $typeName ) : Sulu\Component\Content\Compat\PropertyInterface[] returns child properties of given Type.
getDefaultTypeName ( ) : string return default type name.
getIsBlock ( ) : boolean returns TRUE if property is a block.
getLength ( ) : integer Returns sizeof block.
getProperties ( integer $index ) : BlockPropertyType returns properties for given index.
getType ( string $name ) : BlockPropertyType returns type with given name.
getTypes ( ) : BlockPropertyType[] returns a list of properties managed by this block.
getValue ( ) : array | mixed get value of sub properties.
initProperties ( integer $index, string $typeName ) : BlockPropertyType initiate new child with given type name.
setPropertyValue ( PropertyValue $value )
setValue ( mixed $value ) set value of child properties.

Method Details

__clone() public méthode

public __clone ( )

__construct() public méthode

public __construct ( $name, $metadata, $defaultTypeName, $mandatory = false, $multilingual = false, $maxOccurs = 1, $minOccurs = 1, $params = [], $tags = [], $col = null )

addType() public méthode

adds a type.
public addType ( BlockPropertyType $type )
$type BlockPropertyType

clearProperties() public méthode

clears all initialized properties.
public clearProperties ( )

doSetValue() public méthode

TODO: This is very tedious code. It is important to factor this out.
public doSetValue ( $value )

getChildProperties() public méthode

returns child properties of given Type.
public getChildProperties ( string $typeName ) : Sulu\Component\Content\Compat\PropertyInterface[]
$typeName string
Résultat Sulu\Component\Content\Compat\PropertyInterface[]

getDefaultTypeName() public méthode

return default type name.
public getDefaultTypeName ( ) : string
Résultat string

getIsBlock() public méthode

returns TRUE if property is a block.
public getIsBlock ( ) : boolean
Résultat boolean

getLength() public méthode

Returns sizeof block.
public getLength ( ) : integer
Résultat integer

getProperties() public méthode

returns properties for given index.
public getProperties ( integer $index ) : BlockPropertyType
$index integer
Résultat BlockPropertyType

getType() public méthode

returns type with given name.
public getType ( string $name ) : BlockPropertyType
$name string of property
Résultat BlockPropertyType

getTypes() public méthode

returns a list of properties managed by this block.
public getTypes ( ) : BlockPropertyType[]
Résultat BlockPropertyType[]

getValue() public méthode

get value of sub properties.
public getValue ( ) : array | mixed
Résultat array | mixed

initProperties() public méthode

initiate new child with given type name.
public initProperties ( integer $index, string $typeName ) : BlockPropertyType
$index integer
$typeName string
Résultat BlockPropertyType

setPropertyValue() public méthode

public setPropertyValue ( PropertyValue $value )
$value Sulu\Component\Content\Document\Structure\PropertyValue

setValue() public méthode

set value of child properties.
public setValue ( mixed $value )
$value mixed