PHP Класс Sulu\Component\Content\Compat\Structure

Structures are composed of properties which map to content types.
Наследование: implements Sulu\Component\Content\Compat\StructureInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $key, $metaData )
__get ( $property ) : mixed magic getter.
__isset ( $property ) : boolean magic isset.
__set ( $property, $value ) : mixed magic setter.
addStructureTag ( StructureTag $structureTag ) Add a tag to this structure.
copyFrom ( Sulu\Component\Content\Compat\StructureInterface $structure )
getChanged ( ) : DateTime returns changed DateTime.
getChanger ( ) : integer returns user id of changer.
getChildren ( ) : null | Sulu\Component\Content\Compat\StructureInterface[]
getConcreteLanguages ( ) : array Return the available concrete languages (i.e.
getCreated ( ) : DateTime return created datetime.
getCreator ( ) : integer returns id of creator.
getEnabledShadowLanguages ( ) : array return available shadow languages on this structure (determined at runtime).
getHasChildren ( ) : boolean
getHasTranslation ( ) : boolean return true if structure translation is valid.
getInternal ( ) : boolean
getIsShadow ( ) : boolean set if this structure should act like a shadow.
getKey ( ) : string key of template definition.
getLanguageCode ( ) : string returns language of node.
getLocalizedTitle ( $languageCode )
getNodeName ( )
getNodeState ( )
getNodeType ( ) : integer
getPath ( ) : string returns absolute path of node.
getProperties ( boolean $flatten = false ) : Sulu\Component\Content\Compat\PropertyInterface[] returns an array of properties.
getPropertiesByTagName ( string $tagName ) : Sulu\Component\Content\Compat\PropertyInterface returns properties with given tag name sorted by priority.
getProperty ( $name ) : Sulu\Component\Content\Compat\PropertyInterface returns a property instance with given name.
getPropertyByTagName ( string $tagName, boolean $highest = true ) : Sulu\Component\Content\Compat\PropertyInterface returns a property instance with given tag name.
getPropertyNames ( ) : array returns all property names.
getPropertyValue ( $name ) : mixed return value of property with given name.
getPropertyValueByTagName ( string $tagName ) : mixed returns value of property with given tag name.
getPublished ( ) : DateTime returns first published date.
getPublishedState ( ) : boolean returns true if state of site is "published".
getShadowBaseLanguage ( ) : string return the shadow base language.
getStructureTag ( string $name ) : StructureTag Return the tag with the given name.
getType ( ) : StructureType
getUuid ( ) : string returns uuid of node.
getWebspaceKey ( ) : string returns webspace of node.
hasProperty ( string $name ) : boolean checks if a property exists.
hasStructureTag ( $name ) : boolean Return true if this structure has the given tag.
hasTag ( $tag )
jsonSerialize ( ) : mixed (PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON.
setChanged ( DateTime $changed ) sets changed datetime.
setChanger ( $userId ) sets user id of changer.
setChildren ( Sulu\Component\Content\Compat\StructureInterface[] $children )
setConcreteLanguages ( array $concreteLanguages ) Set the available concrete languages (note this should only be done internally).
setCreated ( DateTime $created ) : DateTime sets created datetime.
setCreator ( $userId ) sets user id of creator.
setEnabledShadowLanguages ( $enabledShadowLanguages ) set the available enabled shadow languages.
setHasChildren ( boolean $hasChildren )
setHasTranslation ( boolean $hasTranslation )
setInternal ( boolean $internal )
setIsShadow ( $isShadow ) set if this node should act like a shadow.
setLanguageCode ( string $language )
setNodeType ( integer $nodeType )
setPath ( string $path )
setPublished ( DateTime $published )
setShadowBaseLanguage ( string $shadowBaseLanguage ) set the shadow base language.
setType ( StructureType $type )
setUuid ( $uuid ) sets uuid of node.
setWebspaceKey ( string $webspace )
toArray ( boolean $complete = true ) : array returns an array of property value pairs.

Защищенные методы

Метод Описание
addChild ( Sulu\Component\Content\Compat\PropertyInterface $property ) adds a property to structure.
addPropertyTags ( Sulu\Component\Content\Compat\PropertyInterface $property ) add tags of properties.

Приватные методы

Метод Описание
appendProperties ( $properties, &$array )
findProperty ( string $name ) : null | Sulu\Component\Content\Compat\PropertyInterface find property in flatten properties.

Описание методов

__construct() публичный Метод

public __construct ( $key, $metaData )
$key string

__get() публичный Метод

magic getter.
public __get ( $property ) : mixed
$property string name of property
Результат mixed

__isset() публичный Метод

magic isset.
public __isset ( $property ) : boolean
$property
Результат boolean

__set() публичный Метод

magic setter.
public __set ( $property, $value ) : mixed
$property string name of property
$value mixed value
Результат mixed

addChild() защищенный Метод

adds a property to structure.
protected addChild ( Sulu\Component\Content\Compat\PropertyInterface $property )
$property Sulu\Component\Content\Compat\PropertyInterface

addPropertyTags() защищенный Метод

add tags of properties.
protected addPropertyTags ( Sulu\Component\Content\Compat\PropertyInterface $property )
$property Sulu\Component\Content\Compat\PropertyInterface

addStructureTag() публичный Метод

Add a tag to this structure.
public addStructureTag ( StructureTag $structureTag )
$structureTag StructureTag

copyFrom() публичный Метод

public copyFrom ( Sulu\Component\Content\Compat\StructureInterface $structure )
$structure Sulu\Component\Content\Compat\StructureInterface

getChanged() публичный Метод

returns changed DateTime.
public getChanged ( ) : DateTime
Результат DateTime

getChanger() публичный Метод

returns user id of changer.
public getChanger ( ) : integer
Результат integer

getChildren() публичный Метод

public getChildren ( ) : null | Sulu\Component\Content\Compat\StructureInterface[]
Результат null | Sulu\Component\Content\Compat\StructureInterface[]

getConcreteLanguages() публичный Метод

the languages which are set and are not shadows).
public getConcreteLanguages ( ) : array
Результат array

getCreated() публичный Метод

return created datetime.
public getCreated ( ) : DateTime
Результат DateTime

getCreator() публичный Метод

returns id of creator.
public getCreator ( ) : integer
Результат integer

getEnabledShadowLanguages() публичный Метод

return available shadow languages on this structure (determined at runtime).
public getEnabledShadowLanguages ( ) : array
Результат array

getHasChildren() публичный Метод

public getHasChildren ( ) : boolean
Результат boolean

getHasTranslation() публичный Метод

return true if structure translation is valid.
public getHasTranslation ( ) : boolean
Результат boolean

getInternal() публичный Метод

public getInternal ( ) : boolean
Результат boolean

getIsShadow() публичный Метод

set if this structure should act like a shadow.
public getIsShadow ( ) : boolean
Результат boolean

getKey() публичный Метод

key of template definition.
public getKey ( ) : string
Результат string

getLanguageCode() публичный Метод

returns language of node.
public getLanguageCode ( ) : string
Результат string

getLocalizedTitle() публичный Метод

public getLocalizedTitle ( $languageCode )

getNodeName() публичный Метод

public getNodeName ( )

getNodeState() публичный Метод

public getNodeState ( )

getNodeType() публичный Метод

public getNodeType ( ) : integer
Результат integer

getPath() публичный Метод

returns absolute path of node.
public getPath ( ) : string
Результат string

getProperties() публичный Метод

returns an array of properties.
public getProperties ( boolean $flatten = false ) : Sulu\Component\Content\Compat\PropertyInterface[]
$flatten boolean
Результат Sulu\Component\Content\Compat\PropertyInterface[]

getPropertiesByTagName() публичный Метод

returns properties with given tag name sorted by priority.
public getPropertiesByTagName ( string $tagName ) : Sulu\Component\Content\Compat\PropertyInterface
$tagName string
Результат Sulu\Component\Content\Compat\PropertyInterface

getProperty() публичный Метод

returns a property instance with given name.
public getProperty ( $name ) : Sulu\Component\Content\Compat\PropertyInterface
$name string name of property
Результат Sulu\Component\Content\Compat\PropertyInterface

getPropertyByTagName() публичный Метод

returns a property instance with given tag name.
public getPropertyByTagName ( string $tagName, boolean $highest = true ) : Sulu\Component\Content\Compat\PropertyInterface
$tagName string
$highest boolean
Результат Sulu\Component\Content\Compat\PropertyInterface

getPropertyNames() публичный Метод

returns all property names.
public getPropertyNames ( ) : array
Результат array

getPropertyValue() публичный Метод

return value of property with given name.
public getPropertyValue ( $name ) : mixed
$name string name of property
Результат mixed

getPropertyValueByTagName() публичный Метод

returns value of property with given tag name.
public getPropertyValueByTagName ( string $tagName ) : mixed
$tagName string
Результат mixed

getPublished() публичный Метод

returns first published date.
public getPublished ( ) : DateTime
Результат DateTime

getPublishedState() публичный Метод

returns true if state of site is "published".
public getPublishedState ( ) : boolean
Результат boolean

getShadowBaseLanguage() публичный Метод

return the shadow base language.
public getShadowBaseLanguage ( ) : string
Результат string

getStructureTag() публичный Метод

Return the tag with the given name.
public getStructureTag ( string $name ) : StructureTag
$name string
Результат StructureTag

getType() публичный Метод

public getType ( ) : StructureType
Результат StructureType

getUuid() публичный Метод

returns uuid of node.
public getUuid ( ) : string
Результат string

getWebspaceKey() публичный Метод

returns webspace of node.
public getWebspaceKey ( ) : string
Результат string

hasProperty() публичный Метод

checks if a property exists.
public hasProperty ( string $name ) : boolean
$name string
Результат boolean

hasStructureTag() публичный Метод

Return true if this structure has the given tag.
public hasStructureTag ( $name ) : boolean
Результат boolean

hasTag() публичный Метод

public hasTag ( $tag )

jsonSerialize() публичный Метод

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON.
public jsonSerialize ( ) : mixed
Результат mixed data which can be serialized by json_encode, which is a value of any type other than a resource

setChanged() публичный Метод

sets changed datetime.
public setChanged ( DateTime $changed )
$changed DateTime

setChanger() публичный Метод

sets user id of changer.
public setChanger ( $userId )
$userId int id of changer

setChildren() публичный Метод

public setChildren ( Sulu\Component\Content\Compat\StructureInterface[] $children )
$children Sulu\Component\Content\Compat\StructureInterface[]

setConcreteLanguages() публичный Метод

Set the available concrete languages (note this should only be done internally).
public setConcreteLanguages ( array $concreteLanguages )
$concreteLanguages array

setCreated() публичный Метод

sets created datetime.
public setCreated ( DateTime $created ) : DateTime
$created DateTime
Результат DateTime

setCreator() публичный Метод

sets user id of creator.
public setCreator ( $userId )
$userId int id of creator

setEnabledShadowLanguages() публичный Метод

set the available enabled shadow languages.
public setEnabledShadowLanguages ( $enabledShadowLanguages )

setHasChildren() публичный Метод

public setHasChildren ( boolean $hasChildren )
$hasChildren boolean

setHasTranslation() публичный Метод

public setHasTranslation ( boolean $hasTranslation )
$hasTranslation boolean

setInternal() публичный Метод

public setInternal ( boolean $internal )
$internal boolean

setIsShadow() публичный Метод

set if this node should act like a shadow.
public setIsShadow ( $isShadow )

setLanguageCode() публичный Метод

public setLanguageCode ( string $language )
$language string

setNodeType() публичный Метод

public setNodeType ( integer $nodeType )
$nodeType integer

setPath() публичный Метод

public setPath ( string $path )
$path string

setPublished() публичный Метод

public setPublished ( DateTime $published )
$published DateTime

setShadowBaseLanguage() публичный Метод

set the shadow base language.
public setShadowBaseLanguage ( string $shadowBaseLanguage )
$shadowBaseLanguage string

setType() публичный Метод

public setType ( StructureType $type )
$type StructureType

setUuid() публичный Метод

sets uuid of node.
public setUuid ( $uuid )
$uuid

setWebspaceKey() публичный Метод

public setWebspaceKey ( string $webspace )
$webspace string

toArray() публичный Метод

returns an array of property value pairs.
public toArray ( boolean $complete = true ) : array
$complete boolean True if result should be representation of full node
Результат array