PHP Class Sulu\Component\Content\Metadata\StructureMetadata

TODO: resource, cacheLifetime and view should be removed. They should instead be options.
Inheritance: extends ItemMetadata
Exibir arquivo Open project: sulu/sulu Class Usage Examples

Public Properties

Property Type Description
$cacheLifetime array
$controller string
$internal boolean
$properties array Same as ItemMetadata::$children but without Sections.
$resource string The resource from which this structure was loaded (useful for debugging).
$view string

Public Methods

Method Description
burnProperties ( ) Populate the $properties property with only those propertires which are not related to the UI (i.e. the sections).
getProperties ( ) : PropertyMetadata[] Return all model properties.
getPropertiesByTagName ( string $tagName ) : PropertyMetadata[] Return all properties with the given tag name.
getProperty ( string $name ) : PropertyMetadata Return a model property.
getPropertyByTagName ( string $tagName, $highest = true ) : PropertyMetadata Return true if the structure contains a property with the given tag name.
getResource ( ) : string Return the resource from which this structure was loaded.
hasProperty ( $name ) : boolean Return true if a property with the given name exists.
hasPropertyWithTagName ( string $tagName ) : boolean Return true if the structure contains a property with the given tag name.
isInternal ( ) : boolean Return if this is an internal structure.

Method Details

burnProperties() public method

The data is therefore duplicated, but this does not matter as we only create this data once. This should be called once after creating the structure and (therefore before writing to the cache).
public burnProperties ( )

getProperties() public method

The "model" set of properties does not include UI elements such as sections.
public getProperties ( ) : PropertyMetadata[]
return PropertyMetadata[]

getPropertiesByTagName() public method

Return all properties with the given tag name.
public getPropertiesByTagName ( string $tagName ) : PropertyMetadata[]
$tagName string
return PropertyMetadata[]

getProperty() public method

Return a model property.
See also: StructureMetadata::getProperties()
public getProperty ( string $name ) : PropertyMetadata
$name string
return PropertyMetadata

getPropertyByTagName() public method

Return true if the structure contains a property with the given tag name.
public getPropertyByTagName ( string $tagName, $highest = true ) : PropertyMetadata
$tagName string
return PropertyMetadata

getResource() public method

Return the resource from which this structure was loaded.
public getResource ( ) : string
return string

hasProperty() public method

Return true if a property with the given name exists.
public hasProperty ( $name ) : boolean
return boolean

hasPropertyWithTagName() public method

Return true if the structure contains a property with the given tag name.
public hasPropertyWithTagName ( string $tagName ) : boolean
$tagName string
return boolean

isInternal() public method

TODO: Refactor this: https://github.com/sulu-io/sulu/issues/1220
public isInternal ( ) : boolean
return boolean

Property Details

$cacheLifetime public_oe property

public array $cacheLifetime
return array

$controller public_oe property

public string $controller
return string

$internal public_oe property

public bool $internal
return boolean

$properties public_oe property

Same as ItemMetadata::$children but without Sections.
See also: StructureMetadata::burnProperties()
public array $properties
return array

$resource public_oe property

The resource from which this structure was loaded (useful for debugging).
public string $resource
return string

$view public_oe property

public string $view
return string