PHP Class Sulu\Component\Localization\Localization

Inheritance: implements JsonSerializable, implements Sulu\Component\Util\ArrayableInterface
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $language = null, $country = null )
__toString ( ) : string
addChild ( Localization $child ) Adds a new child localization.
findLocalization ( string $localization ) : Localization | null
getAllLocalizations ( ) : Localization[] Returns a list of all localizations and sublocalizations.
getChildren ( ) : Localization[] Returns the children of the localization.
getCountry ( ) : string Returns the country of this localization.
getLanguage ( ) : string Returns the language of this localization.
getLocale ( string $format = self::UNDERSCORE ) : string Returns the localization code, which is a combination of the language and the country in a specific format.
getLocalization ( string $delimiter = '_' ) : string Returns the localization code, which is a combination of the language and the country.
getParent ( ) : Localization Returns the parent of this localization.
getShadow ( ) : string Returns how to handle shadow pages for this localization.
isDefault ( ) : boolean Returns if this localization is the default one.
isXDefault ( ) : boolean Returns if this localization is the x-default one.
jsonSerialize ( )
setChildren ( Localization[] $children ) Sets the children of the localization.
setCountry ( string $country ) Sets the country of this localization.
setDefault ( boolean $default ) Sets if this localization is the default one.
setLanguage ( string $language ) Sets the language of this localization.
setParent ( Localization $parent ) Sets the parent of this localization.
setShadow ( string $shadow ) Sets how to handle shadow pages for this localization.
setXDefault ( boolean $xDefault ) Sets if this localization is the x-default one.
toArray ( $depth = null )

Method Details

__construct() public méthode

public __construct ( $language = null, $country = null )

__toString() public méthode

public __toString ( ) : string
Résultat string

addChild() public méthode

Adds a new child localization.
public addChild ( Localization $child )
$child Localization

findLocalization() public méthode

public findLocalization ( string $localization ) : Localization | null
$localization string
Résultat Localization | null

getAllLocalizations() public méthode

Returns a list of all localizations and sublocalizations.
public getAllLocalizations ( ) : Localization[]
Résultat Localization[]

getChildren() public méthode

Returns the children of the localization.
public getChildren ( ) : Localization[]
Résultat Localization[]

getCountry() public méthode

Returns the country of this localization.
public getCountry ( ) : string
Résultat string

getLanguage() public méthode

Returns the language of this localization.
public getLanguage ( ) : string
Résultat string

getLocale() public méthode

Returns the localization code, which is a combination of the language and the country in a specific format.
public getLocale ( string $format = self::UNDERSCORE ) : string
$format string requested localization format
Résultat string

getLocalization() public méthode

Returns the localization code, which is a combination of the language and the country.
Deprecation: use getLocale instead
public getLocalization ( string $delimiter = '_' ) : string
$delimiter string between language and country
Résultat string

getParent() public méthode

Returns the parent of this localization.
public getParent ( ) : Localization
Résultat Localization

getShadow() public méthode

Returns how to handle shadow pages for this localization.
public getShadow ( ) : string
Résultat string

isDefault() public méthode

Returns if this localization is the default one.
public isDefault ( ) : boolean
Résultat boolean True if this is the default localization, otherwise false

isXDefault() public méthode

Returns if this localization is the x-default one.
public isXDefault ( ) : boolean
Résultat boolean True if this is the x-default localization, otherwise false

jsonSerialize() public méthode

public jsonSerialize ( )

setChildren() public méthode

Sets the children of the localization.
public setChildren ( Localization[] $children )
$children Localization[]

setCountry() public méthode

Sets the country of this localization.
public setCountry ( string $country )
$country string

setDefault() public méthode

Sets if this localization is the default one.
public setDefault ( boolean $default )
$default boolean

setLanguage() public méthode

Sets the language of this localization.
public setLanguage ( string $language )
$language string

setParent() public méthode

Sets the parent of this localization.
public setParent ( Localization $parent )
$parent Localization

setShadow() public méthode

Sets how to handle shadow pages for this localization.
public setShadow ( string $shadow )
$shadow string

setXDefault() public méthode

Sets if this localization is the x-default one.
public setXDefault ( boolean $xDefault )
$xDefault boolean

toArray() public méthode

public toArray ( $depth = null )