PHP Class Sulu\Component\Webspace\Webspace

Inheritance: implements Sulu\Component\Util\ArrayableInterface
Show file Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
addDefaultTemplate ( string $type, string $template ) Add a new default template for given type.
addLocalization ( Localization $localization ) Adds a localization to the webspace.
addPortal ( Portal $portal ) Adds a portal to the webspace.
addSegment ( Segment $segment ) Adds a segment to the webspace.
addTemplate ( string $type, string $template ) Add a new template for given type.
getAllLocalizations ( ) : Localization[] Returns a list of all localizations and sublocalizations.
getDefaultLocalization ( ) : Localization Returns the default localization for this webspace.
getDefaultSegment ( ) : Segment Returns the default segment for this webspace.
getDefaultTemplate ( string $type ) : string | null Returns a error template for given code.
getDefaultTemplates ( ) : string Returns a array of default template.
getKey ( ) : string Returns the key of the webspace.
getLocalization ( string $localization ) : Localization | null Returns the localization object for a given localization string.
getLocalizations ( ) : Localization[] Returns the localizations of this webspace.
getName ( ) : string Returns the name of the webspace.
getNavigation ( ) : Navigation
getPortals ( ) : Portal[] Returns the portals of this webspace.
getResourceLocatorStrategy ( ) : string Returns resource-locator strategy.
getSecurity ( ) : Security Returns the security system.
getSegments ( ) : Segment[] Returns the segments of this webspace.
getTemplate ( string $type ) : string | null Returns a template for the given type.
getTemplates ( ) : string[] Returns an array of templates.
getTheme ( ) : string Returns the theme for this portal.
getXDefaultLocalization ( ) : Localization Returns the x-default localization for this webspace.
hasDomain ( string $domain, string $environment ) : boolean Returns false if domain not exists in webspace.
setDefaultLocalization ( Localization $defaultLocalization ) Sets the default localization for this webspace.
setDefaultSegment ( Segment $defaultSegment ) Sets the default segment of this webspace.
setKey ( string $key ) Sets the key of the webspace.
setLocalizations ( Localization[] $localizations ) Returns the localizations of this webspace.
setName ( string $name ) Sets the name of the webspace.
setNavigation ( Navigation $navigation )
setPortals ( Portal[] $portals ) Sets the portals of this webspace.
setResourceLocatorStrategy ( string $resourceLocatorStrategy ) Set resource-locator strategy.
setSecurity ( Security $security ) Sets the security system.
setSegments ( Segment[] $segments ) Sets the segments of this webspace.
setTheme ( string | null $theme = null ) Sets the theme for this portal.
toArray ( $depth = null )

Method Details

addDefaultTemplate() public method

Add a new default template for given type.
public addDefaultTemplate ( string $type, string $template )
$type string
$template string

addLocalization() public method

Adds a localization to the webspace.
public addLocalization ( Localization $localization )
$localization Sulu\Component\Localization\Localization

addPortal() public method

Adds a portal to the webspace.
public addPortal ( Portal $portal )
$portal Portal

addSegment() public method

Adds a segment to the webspace.
public addSegment ( Segment $segment )
$segment Segment

addTemplate() public method

Add a new template for given type.
public addTemplate ( string $type, string $template )
$type string
$template string

getAllLocalizations() public method

Returns a list of all localizations and sublocalizations.
public getAllLocalizations ( ) : Localization[]
return Sulu\Component\Localization\Localization[]

getDefaultLocalization() public method

Returns the default localization for this webspace.
public getDefaultLocalization ( ) : Localization
return Sulu\Component\Localization\Localization

getDefaultSegment() public method

Returns the default segment for this webspace.
public getDefaultSegment ( ) : Segment
return Segment

getDefaultTemplate() public method

Returns a error template for given code.
public getDefaultTemplate ( string $type ) : string | null
$type string
return string | null

getDefaultTemplates() public method

Returns a array of default template.
public getDefaultTemplates ( ) : string
return string

getKey() public method

Returns the key of the webspace.
public getKey ( ) : string
return string

getLocalization() public method

Returns the localization object for a given localization string.
public getLocalization ( string $localization ) : Localization | null
$localization string
return Sulu\Component\Localization\Localization | null

getLocalizations() public method

Returns the localizations of this webspace.
public getLocalizations ( ) : Localization[]
return Sulu\Component\Localization\Localization[]

getName() public method

Returns the name of the webspace.
public getName ( ) : string
return string

getNavigation() public method

public getNavigation ( ) : Navigation
return Navigation

getPortals() public method

Returns the portals of this webspace.
public getPortals ( ) : Portal[]
return Portal[]

getResourceLocatorStrategy() public method

Returns resource-locator strategy.

getSecurity() public method

Returns the security system.
public getSecurity ( ) : Security
return Security

getSegments() public method

Returns the segments of this webspace.
public getSegments ( ) : Segment[]
return Segment[]

getTemplate() public method

Returns a template for the given type.
public getTemplate ( string $type ) : string | null
$type string
return string | null

getTemplates() public method

Returns an array of templates.
public getTemplates ( ) : string[]
return string[]

getTheme() public method

Returns the theme for this portal.
public getTheme ( ) : string
return string

getXDefaultLocalization() public method

Returns the x-default localization for this webspace.
public getXDefaultLocalization ( ) : Localization
return Sulu\Component\Localization\Localization

hasDomain() public method

Returns false if domain not exists in webspace.
public hasDomain ( string $domain, string $environment ) : boolean
$domain string
$environment string
return boolean

setDefaultLocalization() public method

Sets the default localization for this webspace.
public setDefaultLocalization ( Localization $defaultLocalization )
$defaultLocalization Sulu\Component\Localization\Localization

setDefaultSegment() public method

Sets the default segment of this webspace.
public setDefaultSegment ( Segment $defaultSegment )
$defaultSegment Segment

setKey() public method

Sets the key of the webspace.
public setKey ( string $key )
$key string

setLocalizations() public method

Returns the localizations of this webspace.
public setLocalizations ( Localization[] $localizations )
$localizations Sulu\Component\Localization\Localization[]

setName() public method

Sets the name of the webspace.
public setName ( string $name )
$name string

setNavigation() public method

public setNavigation ( Navigation $navigation )
$navigation Navigation

setPortals() public method

Sets the portals of this webspace.
public setPortals ( Portal[] $portals )
$portals Portal[]

setResourceLocatorStrategy() public method

Set resource-locator strategy.
public setResourceLocatorStrategy ( string $resourceLocatorStrategy )
$resourceLocatorStrategy string

setSecurity() public method

Sets the security system.
public setSecurity ( Security $security )
$security Security

setSegments() public method

Sets the segments of this webspace.
public setSegments ( Segment[] $segments )
$segments Segment[]

setTheme() public method

Sets the theme for this portal.
public setTheme ( string | null $theme = null )
$theme string | null this parameter is options

toArray() public method

public toArray ( $depth = null )