См. определение в файле Block.php строка 11
◆ __construct()
__construct |
( |
string | $code, |
|
|
string | $section, |
|
|
string | $bgType ) |
Constructs a new Block object with the specified parameters.
- Аргументы
-
string | $code | The unique code identifying the block. |
string | $section | The section to which the block belongs. |
string | $bgType | The background type for the block. |
См. определение в файле Block.php строка 42
◆ addNode()
Adds a node to the block's collection of nodes.
- Аргументы
-
Node | $node | The Node object to be added to the block. |
- Возвращает
- self The updated Block object, enabling method chaining.
См. определение в файле Block.php строка 227
◆ fromArray()
Creates a Block object from an associative array of data.
- Аргументы
-
array | $data | An associative array containing block configuration data. |
- Возвращает
- self A Block object populated with the provided data.
См. определение в файле Block.php строка 311
◆ getAnchor()
◆ getBgType()
Retrieves the background type of the block.
- Возвращает
- string The current background type of the block.
См. определение в файле Block.php строка 136
◆ getCode()
Retrieves the code of the block.
- Возвращает
- string The code of the block.
См. определение в файле Block.php строка 75
◆ getId()
Retrieves the unique identifier of the block.
- Возвращает
- int The unique identifier of the block, or 0 if not initialized.
См. определение в файле Block.php строка 196
◆ 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()
Return Site object containing it Block
- Возвращает
- Site
См. определение в файле Block.php строка 65
◆ getSection()
Retrieves the section of the block.
- Возвращает
- string The section of the block.
См. определение в файле Block.php строка 85
◆ getStyles()
◆ 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()
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()
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()
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()
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 | $bgType | The background type to be set for the block. |
- Возвращает
- self The updated Block object, enabling method chaining.
См. определение в файле Block.php строка 148
◆ setId()
Sets the unique identifier for the block.
- Аргументы
-
int | $id | The 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 | $menuTitle | The 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
- Аргументы
-
- Возвращает
- $this
См. определение в файле Block.php строка 54
◆ setStyles()
setStyles |
( |
array | $styles | ) |
|
◆ setWrapperClasses()
setWrapperClasses |
( |
array | $classes | ) |
|
Sets the CSS classes for the block's wrapper.
- Аргументы
-
array | $classes | The CSS classes to be set for the block's wrapper. |
- Возвращает
- self The updated Block object, enabling method chaining.
См. определение в файле Block.php строка 270
◆ 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