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

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

 __construct (string $code, string $section, string $bgType)
 setParentSite (Site $site)
 getParentSite ()
 getCode ()
 getSection ()
 isMenu ()
 isSeparator ()
 isCover ()
 isTitle ()
 getBgType ()
 setBgType (string $bgType)
 getMenuTitle ()
 setMenuTitle (string $menuTitle)
 setStyles (array $styles)
 getStyles ()
 getId ()
 setId (int $id)
 addNode (Node $node)
 getNodes (?array $codes=null)
 getWrapperClasses ()
 setWrapperClasses (array $classes)
 toArray ()

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

static getAnchor (int $id)
static fromArray (array $data)

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

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

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

◆ __construct()

__construct ( string $code,
string $section,
string $bgType )

Constructs a new Block object with the specified parameters.

Аргументы
string$codeThe unique code identifying the block.
string$sectionThe section to which the block belongs.
string$bgTypeThe background type for the block.

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

Методы

◆ addNode()

addNode ( Node $node)

Adds a node to the block's collection of nodes.

Аргументы
Node$nodeThe Node object to be added to the block.
Возвращает
self The updated Block object, enabling method chaining.

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

◆ fromArray()

fromArray ( array $data)
static

Creates a Block object from an associative array of data.

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

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

◆ getAnchor()

getAnchor ( int $id)
static

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

◆ getBgType()

getBgType ( )

Retrieves the background type of the block.

Возвращает
string The current background type of the block.

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

◆ getCode()

getCode ( )

Retrieves the code of the block.

Возвращает
string The code of the block.

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

◆ getId()

getId ( )

Retrieves the unique identifier of the block.

Возвращает
int The unique identifier of the block, or 0 if not initialized.

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

◆ getMenuTitle()

getMenuTitle ( )

Retrieves the menu title of the block.

Возвращает
string The menu title of the block, or an empty string if not set.

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

◆ getNodes()

getNodes ( ?array $codes = null)

Return node objects

Аргументы
string[] | null$codes- optional. If pass array of code-string - return just nodes with this codes
Возвращает
Node[] - may be empty

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

◆ getParentSite()

getParentSite ( )

Return Site object containing it Block

Возвращает
Site

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

◆ getSection()

getSection ( )

Retrieves the section of the block.

Возвращает
string The section of the block.

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

◆ getStyles()

getStyles ( )

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

◆ getWrapperClasses()

getWrapperClasses ( )

Retrieves the CSS classes set for the block's wrapper.

Возвращает
array An array of CSS classes assigned to the block's wrapper.

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

◆ isCover()

isCover ( )

Checks if the section of the block is a cover section.

Возвращает
bool True if the section is a cover section, false otherwise.

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

◆ isMenu()

isMenu ( )

Checks if the section of the block is a menu section.

Возвращает
bool True if the section is a menu section, false otherwise.

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

◆ isSeparator()

isSeparator ( )

Checks if the section of the block is a separators section.

Возвращает
bool True if the section is a separators section, false otherwise.

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

◆ isTitle()

isTitle ( )

Checks if the section of the block is a title section.

Возвращает
bool True if the section is a title section, false otherwise.

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

◆ setBgType()

setBgType ( string $bgType)

Sets the background type for the block.

Аргументы
string$bgTypeThe background type to be set for the block.
Возвращает
self The updated Block object, enabling method chaining.

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

◆ setId()

setId ( int $id)

Sets the unique identifier for the block.

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

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

◆ setMenuTitle()

setMenuTitle ( string $menuTitle)

Sets the menu title for the block.

Аргументы
string$menuTitleThe menu title to be set for the block.
Возвращает
self The updated Block object, enabling method chaining.

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

◆ setParentSite()

setParentSite ( Site $site)

Set relation between Block and Site containing it

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

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

◆ setStyles()

setStyles ( array $styles)

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

◆ setWrapperClasses()

setWrapperClasses ( array $classes)

Sets the CSS classes for the block's wrapper.

Аргументы
array$classesThe CSS classes to be set for the block's wrapper.
Возвращает
self The updated Block object, enabling method chaining.

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

◆ toArray()

toArray ( )

Converts the Block object to an associative array representation.

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

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


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