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

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

static getSiteJsonString (Site $siteData, string $requestCode)
static getBlockJsonString (array $blocks)
static initSiteBlocks (Site $siteData, array $json)
static initSiteContent (Site $siteData, array $json)
static initSiteBlock (Site $siteData, array $json)
static saveImgNodesDataFromResponse (Site $siteData, array $result)
static compressJsonString (string $json)
static expandJsonString (string $json)
static getSkeletonForSiteDataResponse ()
static getSkeletonForBlocksContentResponse (string $jsonDataForRequest)
static getSkeletonForBlockContentResponse (string $jsonDataForRequest)

Защищенные статические члены

static prepareNode (Node $node)
static filterNodesByEmptyPromptTexts (array $blocksWithImgNodes)

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

Provide data transfer between json arrays and data objects

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

Методы

◆ compressJsonString()

compressJsonString ( string $json)
static

Compresses a JSON string by replacing long class names with shorter aliases.

Аргументы
string$jsonThe JSON string containing class names to be compressed.
Возвращает
string The JSON string with compressed class names.

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

◆ expandJsonString()

expandJsonString ( string $json)
static

Expands a compressed JSON string by replacing short class name aliases with their full names.

Аргументы
string$jsonThe compressed JSON string containing abbreviated class names.
Возвращает
string The JSON string with expanded class names.

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

◆ filterNodesByEmptyPromptTexts()

filterNodesByEmptyPromptTexts ( array $blocksWithImgNodes)
staticprotected

Filters blocks by removing nodes with non-empty 'promptTexts' and clears 'promptTexts' from filtered nodes.

Аргументы
array$blocksWithImgNodesAn array of blocks, each containing a 'nodes' key with an array of nodes.
Возвращает
array The filtered array of blocks, each with only nodes that had empty 'promptTexts'.

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

◆ getBlockJsonString()

getBlockJsonString ( array $blocks)
static

Retrieves block data, and encodes it into a JSON string.

Аргументы
Block[]$blocksAn array of Block objects.
Возвращает
string JSON encoded string of block data, or empty string on failure.

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

◆ getSiteJsonString()

getSiteJsonString ( Site $siteData,
string $requestCode )
static

Retrieves site data and chat data, and encodes it into a JSON string.

Возвращает
string JSON encoded string of site and chat data, or false on failure.

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

◆ getSkeletonForBlockContentResponse()

getSkeletonForBlockContentResponse ( string $jsonDataForRequest)
static

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

◆ getSkeletonForBlocksContentResponse()

getSkeletonForBlocksContentResponse ( string $jsonDataForRequest)
static

Generates a JSON skeleton string for block content responses with placeholder values.

Аргументы
string$jsonDataForRequestThe JSON string encoding block data to be used for skeleton creation.
Возвращает
string The JSON-encoded skeleton string with placeholders, or an empty string on error.

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

◆ getSkeletonForSiteDataResponse()

getSkeletonForSiteDataResponse ( )
static

Generates a JSON skeleton string for site data responses with placeholder values.

Возвращает
string A JSON-encoded skeleton string for site data with placeholders, or an empty string on error.

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

◆ initSiteBlock()

initSiteBlock ( Site $siteData,
array $json )
static

Initializes site blocks using data from a JSON response.

Аргументы
Site$siteDataThe site data object containing blocks to be initialized.
array$jsonAn associative array with block configuration data from the response.
Возвращает
void

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

◆ initSiteBlocks()

initSiteBlocks ( Site $siteData,
array $json )
static

Initializes site blocks using data from a JSON response.

Аргументы
Site$siteDataThe site data object containing blocks to be initialized.
array$jsonAn associative array with block configuration data from the response.
Возвращает
void

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

◆ initSiteContent()

initSiteContent ( Site $siteData,
array $json )
static

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

◆ prepareNode()

prepareNode ( Node $node)
staticprotected

Prepares a node based on its type, for use in a prepared block.

Аргументы
Node$nodeAn object representing a block node.
Возвращает
array|null An associative array representing the prepared node or null if not applicable.

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

◆ saveImgNodesDataFromResponse()

saveImgNodesDataFromResponse ( Site $siteData,
array $result )
static

Initializes image nodes for a site using response data.

Аргументы
Site$siteDataThe site data object containing blocks to be initialized.
array$resultAn associative array with image node response data to be applied to the site.
Возвращает
void

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


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