1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Site

Открытые члены

 __construct ()
 initRandom ()
 initByBlockIds (array $blockIds)
 addBlock (Data\Block $block)
 getBlocks (?array $ids=null)
 getTitleStyleClass ()
 setSiteTitle (string $title)
 setPageTitle (string $title)
 setPageDescription (string $title)
 setSiteTopic (string $topic)
 setImageStyle (string $style)
 setKeywords (string $keywords)
 getSiteTitle ()
 getPageTitle ()
 getPageDescription ()
 getSiteTopic ()
 getImageStyle ()
 getKeywords ()
 setColors (ColorsDto $colors)
 getColors ()
 setFonts (FontsDto $fonts)
 getFonts ()
 setPreviewImagePromptText (string $previewImagePromptText)
 getPreviewImagePromptText ()
 setPreviewImageSrc (string $previewImageSrc)
 getPreviewImageSrc ()
 getMenuBlock ()
 setSiteId (int $id)
 setLandingId (int $id)
 getSiteId ()
 getLandingId ()
 getLandingInstance ()
 setWishes (Wishes $data)
 setTitleStyleClass (string $titleStyleClass)
 getWishes ()
 toArray ()
 getImagesSet ()

Открытые статические члены

static fromArray (array $data)
static initSite (Site $siteData, array $json)

Подробное описание

Class Site

Manages site-related data including blocks, titles, colors, and fonts.

См. определение в файле Site.php строка 27

Конструктор(ы)

◆ __construct()

__construct ( )

Site constructor.

См. определение в файле Site.php строка 53

Методы

◆ addBlock()

addBlock ( Data\Block $block)

Adds a block to the site's blocks collection.

Аргументы
Data\Block$blockThe Block object to be added to the site.
Возвращает
self The updated Site object, enabling method chaining.

См. определение в файле Site.php строка 285

◆ fromArray()

fromArray ( array $data)
static

Creates a Site object from an associative array of data.

Аргументы
array$dataAn associative array containing site and block data.
Возвращает
self A Site object with properties populated from the provided array.

См. определение в файле Site.php строка 729

◆ getBlocks()

getBlocks ( ?array $ids = null)

Retrieves the data of the blocks used in the site.

Аргументы
int[] | null$ids- if set - return just blocks with selected IDs
Возвращает
Block[] Array of blocks data.

См. определение в файле Site.php строка 298

◆ getColors()

getColors ( )

Retrieves the colors used in the site.

Возвращает
ColorsDto DTO of colors.

См. определение в файле Site.php строка 484

◆ getFonts()

getFonts ( )

Retrieves the fonts used in the site.

Возвращает
FontsDto DTO of fonts.

См. определение в файле Site.php строка 508

◆ getImagesSet()

getImagesSet ( )

См. определение в файле Site.php строка 998

◆ getImageStyle()

getImageStyle ( )

Retrieves the image style.

Возвращает
string The image style.

См. определение в файле Site.php строка 450

◆ getKeywords()

getKeywords ( )

Retrieves the keywords.

Возвращает
string|null The keywords or null if not set.

См. определение в файле Site.php строка 460

◆ getLandingId()

getLandingId ( )

Retrieves the landing ID associated with the site.

Возвращает
int|null The landing ID of the site, or null if not set.

См. определение в файле Site.php строка 624

◆ getLandingInstance()

getLandingInstance ( )

Retrieves a landing instance by its ID.

Возвращает
Landing|null The landing instance.

См. определение в файле Site.php строка 634

◆ getMenuBlock()

getMenuBlock ( )

Retrieves the data of the menu block used in the site.

Возвращает
Data\Block|null Menu block data.

См. определение в файле Site.php строка 567

◆ getPageDescription()

getPageDescription ( )

Retrieves the page description.

Возвращает
string The page title or a default value if not set.

См. определение в файле Site.php строка 430

◆ getPageTitle()

getPageTitle ( )

Retrieves the page title.

Возвращает
string The page title or a default value if not set.

См. определение в файле Site.php строка 420

◆ getPreviewImagePromptText()

getPreviewImagePromptText ( )

Retrieves the preview image prompt text from the provided data.

Возвращает
string

См. определение в файле Site.php строка 532

◆ getPreviewImageSrc()

getPreviewImageSrc ( )

Retrieves the preview image src from the provided data.

Возвращает
string|null

См. определение в файле Site.php строка 556

◆ getSiteId()

getSiteId ( )

Retrieves the site ID associated with the site.

Возвращает
int|null The site ID, or null if not initialized.

См. определение в файле Site.php строка 613

◆ getSiteTitle()

getSiteTitle ( )

Retrieves the site title.

Возвращает
string The site title or a default value if not set.

См. определение в файле Site.php строка 410

◆ getSiteTopic()

getSiteTopic ( )

Retrieves the site topic.

Возвращает
string The site topic.

См. определение в файле Site.php строка 440

◆ getTitleStyleClass()

getTitleStyleClass ( )

Retrieves the CSS class used for styling titles within the site.

Возвращает
string The CSS class name used for the site's title style.

См. определение в файле Site.php строка 316

◆ getWishes()

getWishes ( )

Retrieves the user data associated with the site.

Возвращает
Wishes The Chat object containing user data, or null if not set.

См. определение в файле Site.php строка 679

◆ initByBlockIds()

initByBlockIds ( array $blockIds)

См. определение в файле Site.php строка 87

◆ initRandom()

initRandom ( )

Initializes the site with random blocks and a random title style class.

Возвращает
void

См. определение в файле Site.php строка 77

◆ initSite()

initSite ( Site $siteData,
array $json )
static

Initializes various site properties using data from a JSON structure.

Аргументы
Site$siteDataThe site data object to initialize.
array$jsonAn associative array containing initial configuration data for the site.
Возвращает
void

См. определение в файле Site.php строка 788

◆ setColors()

setColors ( ColorsDto $colors)

Sets the colors used in the site from the provided data.

Аргументы
ColorsDto$colors
Возвращает
Site

См. определение в файле Site.php строка 472

◆ setFonts()

setFonts ( FontsDto $fonts)

Sets the fonts used in the site from the provided data.

Аргументы
FontsDto$fonts
Возвращает
Site

См. определение в файле Site.php строка 496

◆ setImageStyle()

setImageStyle ( string $style)

Sets the image style from the provided data.

Аргументы
string$style
Возвращает
Site

См. определение в файле Site.php строка 384

◆ setKeywords()

setKeywords ( string $keywords)

Sets the keywords from the provided data.

Аргументы
string$keywords
Возвращает
Site

См. определение в файле Site.php строка 398

◆ setLandingId()

setLandingId ( int $id)

Sets the landing ID for the site.

Аргументы
int$idThe landing ID to be set for the site.
Возвращает
self The updated Site object, allowing method chaining.

См. определение в файле Site.php строка 601

◆ setPageDescription()

setPageDescription ( string $title)

Sets the page description from the provided data.

Аргументы
string$title
Возвращает
Site

См. определение в файле Site.php строка 356

◆ setPageTitle()

setPageTitle ( string $title)

Sets the page title from the provided data.

Аргументы
string$title
Возвращает
Site

См. определение в файле Site.php строка 342

◆ setPreviewImagePromptText()

setPreviewImagePromptText ( string $previewImagePromptText)

Sets the preview image prompt text from the provided data.

Аргументы
string$previewImagePromptText
Возвращает
Site

См. определение в файле Site.php строка 520

◆ setPreviewImageSrc()

setPreviewImageSrc ( string $previewImageSrc)

Sets the preview image src from the provided data.

Аргументы
string$previewImageSrc
Возвращает
Site

См. определение в файле Site.php строка 544

◆ setSiteId()

setSiteId ( int $id)

Sets the site ID for the site.

Аргументы
int$idThe site ID to be set.
Возвращает
self The updated Site object, enabling method chaining.

См. определение в файле Site.php строка 587

◆ setSiteTitle()

setSiteTitle ( string $title)

Sets the site title from the provided data.

Аргументы
string$title
Возвращает
Site

См. определение в файле Site.php строка 328

◆ setSiteTopic()

setSiteTopic ( string $topic)

Sets the site topic from the provided data.

Аргументы
string$topic
Возвращает
Site

См. определение в файле Site.php строка 370

◆ setTitleStyleClass()

setTitleStyleClass ( string $titleStyleClass)

Sets the CSS class for the title style of the site.

Аргументы
string$titleStyleClassThe CSS class to be set for the site's title style.
Возвращает
self The updated Site object, enabling method chaining.

См. определение в файле Site.php строка 667

◆ setWishes()

setWishes ( Wishes $data)

Sets the user data associated with the site.

Аргументы
Wishes$dataThe data to assign to the wishes property, generally an object encapsulating user details.
Возвращает
self The updated Site object, allowing method chaining.

См. определение в файле Site.php строка 653

◆ toArray()

toArray ( )

Converts the Site object to an associative array representation.

Возвращает
array An associative array representing the Site object and its components.

См. определение в файле Site.php строка 689


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/landing/lib/Copilot/Data/Site.php