class Site implements TreeInterface, ObjectInterface, ObjectInterface, JsonSerializable (View source)

Traits

Properties

protected Liaison $siteConfig

The site configuration repository.

protected int $siteID

The site identifier.

protected int $pThemeID

The ID of the theme.

protected $pThemeSkinIdentifier

A theme skin to use for this site.

protected bool $siteIsDefault

Is this the default site?

protected string $siteHandle

The site handle.

protected Locale[]|ArrayCollection $locales

The language sections of this site.

protected Type|null $type

The site type.

Methods

getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)

No description

getAttribute($ak, $mode = false)

No description

Value
getAttributeValue($ak)

No description

clearAttribute($ak, bool $doReindexImmediately = true)

No description

Value
setAttribute($ak, mixed $value, bool $doReindexImmediately = true)

Sets the attribute of a user info object to the specified value, and saves it in the database.

__construct(Repository $appConfigRepository)

Initialize the instance.

updateSiteConfigRepository(Repository $appConfigRepository)

Set the site configuration repository.

getConfigRepository()

Get the site configuration repository.

Type|null
getType()

Get the site type object.

setType(Type|null $type)

Set the site type object.

Locale[]|ArrayCollection
getLocales()

Get the language sections of this site.

setLocales(Locale[]|ArrayCollection $locales)

Set the language sections of this site.

int|null
getSiteHomePageID()

Get the ID of the home page.

int|null
getSiteTreeID()

No description

Locale|null
getDefaultLocale()

Get the default locale (if set).

Tree|null
getSiteTreeObject()

No description

Page|null
getSiteHomePageObject(string|int $version = 'RECENT')

Get the home page of the default language.

int
getSiteID()

Get the ID of the site.

string
getSiteHandle()

Get the handle of the site.

setSiteHandle(string $siteHandle)

Set the handle of the site.

bool
isDefault()

Is this the default site?

setIsDefault(bool $siteIsDefault)

Is this the default site?

string|mixed
getSiteName()

Get the name of the site.

bool
setSiteName(string|mixed $name)

Set the name of the site.

string
getSiteCanonicalURL()

Get the main site canonical URL.

string
getSiteAlternativeCanonicalURL()

Get the alternative site canonical URL.

string
getSiteSSLCanonicalURL()

Get the HTTPS site canonical URL (it may be the main or the alternative canonical URL).

string
getTimezone()

Get the site time zone identifier.

int
getThemeID()

Get the ID of the theme.

setThemeID(int $pThemeID)

Set the ID of the theme.

jsonSerialize()

No description

mixed
getThemeSkinIdentifier()

No description

void
setThemeSkinIdentifier(mixed $pThemeSkinIdentifier)

No description

Details

CategoryInterface getObjectAttributeCategory()

AttributeValueInterface|null getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)

No description

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

bool $createIfNotExists

Shall the generic attribute value be created if it does not already exist?

Return Value

AttributeValueInterface|null

See also

ObjectInterface::getAttributeValueObject

getAttribute($ak, $mode = false)

No description

Parameters

$ak
$mode

Value getAttributeValue($ak)

No description

Parameters

$ak

Return Value

Value

clearAttribute($ak, bool $doReindexImmediately = true)

No description

Parameters

$ak
bool $doReindexImmediately

Value setAttribute($ak, mixed $value, bool $doReindexImmediately = true)

Sets the attribute of a user info object to the specified value, and saves it in the database.

Parameters

$ak
mixed $value
bool $doReindexImmediately

Return Value

Value

__construct(Repository $appConfigRepository)

Initialize the instance.

Parameters

Repository $appConfigRepository

The site configuration repository

getPermissionObjectIdentifier()

getPermissionResponseClassName()

getPermissionAssignmentClassName()

getPermissionObjectKeyCategoryHandle()

updateSiteConfigRepository(Repository $appConfigRepository)

Set the site configuration repository.

Parameters

Repository $appConfigRepository

Liaison getConfigRepository()

Get the site configuration repository.

Return Value

Liaison

Type|null getType()

Get the site type object.

Return Value

Type|null

setType(Type|null $type)

Set the site type object.

Parameters

Type|null $type

Locale[]|ArrayCollection getLocales()

Get the language sections of this site.

Return Value

Locale[]|ArrayCollection

setLocales(Locale[]|ArrayCollection $locales)

Set the language sections of this site.

Parameters

Locale[]|ArrayCollection $locales

int|null getSiteHomePageID()

Get the ID of the home page.

Return Value

int|null

int|null getSiteTreeID()

No description

Return Value

int|null

See also

TreeInterface::getSiteTreeID

Locale|null getDefaultLocale()

Get the default locale (if set).

Return Value

Locale|null

Tree|null getSiteTreeObject()

No description

Return Value

Tree|null

See also

TreeInterface::getSiteTreeObject

Page|null getSiteHomePageObject(string|int $version = 'RECENT')

Get the home page of the default language.

Parameters

string|int $version

'ACTIVE', 'RECENT' or a specific page version ID

Return Value

Page|null

int getSiteID()

Get the ID of the site.

Return Value

int

string getSiteHandle()

Get the handle of the site.

Return Value

string

setSiteHandle(string $siteHandle)

Set the handle of the site.

Parameters

string $siteHandle

bool isDefault()

Is this the default site?

Return Value

bool

setIsDefault(bool $siteIsDefault)

Is this the default site?

Parameters

bool $siteIsDefault

string|mixed getSiteName()

Get the name of the site.

Return Value

string|mixed

bool setSiteName(string|mixed $name)

Set the name of the site.

Parameters

string|mixed $name

Return Value

bool

returns true if the name has been correctly set, false otherwise

string getSiteCanonicalURL()

Get the main site canonical URL.

Return Value

string

empty string if it's not set

string getSiteAlternativeCanonicalURL()

Get the alternative site canonical URL.

Return Value

string

empty string if it's not set

string getSiteSSLCanonicalURL()

Get the HTTPS site canonical URL (it may be the main or the alternative canonical URL).

Return Value

string

empty string if it's not set

string getTimezone()

Get the site time zone identifier.

Return Value

string

int getThemeID()

Get the ID of the theme.

Return Value

int

setThemeID(int $pThemeID)

Set the ID of the theme.

Parameters

int $pThemeID

jsonSerialize()

No description

mixed getThemeSkinIdentifier()

No description

Return Value

mixed

void setThemeSkinIdentifier(mixed $pThemeSkinIdentifier)

No description

Parameters

mixed $pThemeSkinIdentifier

Return Value

void