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

Inheritance: extends Sulu\Component\Content\Compat\Property, implements Sulu\Component\Content\Compat\Block\BlockPropertyInterface
ファイルを表示 Open project: sulu/sulu Class Usage Examples

Public Methods

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

public __clone ( )

__construct() public method

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

addType() public method

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

clearProperties() public method

clears all initialized properties.
public clearProperties ( )

doSetValue() public method

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

getChildProperties() public method

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

getDefaultTypeName() public method

return default type name.
public getDefaultTypeName ( ) : string
return string

getIsBlock() public method

returns TRUE if property is a block.
public getIsBlock ( ) : boolean
return boolean

getLength() public method

Returns sizeof block.
public getLength ( ) : integer
return integer

getProperties() public method

returns properties for given index.
public getProperties ( integer $index ) : BlockPropertyType
$index integer
return BlockPropertyType

getType() public method

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

getTypes() public method

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

getValue() public method

get value of sub properties.
public getValue ( ) : array | mixed
return array | mixed

initProperties() public method

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

setPropertyValue() public method

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

setValue() public method

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