CSite Class

CSite class is used to handle sites.

Equivalent to the class in the new core D7: Bitrix\Main\SiteTable.


LID char (2) Site ID.
SORT int Sorting order.
DEF char Default site (Y|N).
ACTIVE char Active (Y|N).
NAME varchar (50) Site short name.
DIR varchar (50) Root directory of the site content.
FORMAT_DATE varchar (50) Date format.
FORMAT_DATETIME varchar (50) Date and time format.
CHARSET varchar (255) Site pages encoding.
LANGUAGE_ID char (2) Site language ID.
DOC_ROOT varchar (255) Full path to the root directory of the site web server content (if sites have different DOCUMENT_ROOT).
SERVER_NAME varchar (255) Site URL.
SITE_NAME varchar (255) Site full name.
DOMAINS varchar (255) List of domains, entered via separator - \n.
EMAIL varchar (255) The default e-mail address.
CULTURE_ID varchar (50) Regional settings. Values are received via the CultureTable class.
ABS_DOC_ROOT varchar (255) Real DOCUMENT_ROOT for the site.

Class methods

MethodDescriptionAvailable from version
GetList Returns list of sites.
GetByID Returns information about the specified site.
GetTimeFormat Returns date format for the site language.
Add Adds a new site.
Update Updates the existing site.
Delete Deletes a site.
GetDateFormat Returns format of the date (time) for the specified site.
GetTemplateList Returns list of site templates.
InDir Checks a directory location.
InGroup Checks if the current user is included into the specified groups.

See Also

© «Bitrix24», 2001-2024