Skip to content

Commit

Permalink
upd readme and up version
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfriend committed Dec 26, 2021
1 parent f5bb6c2 commit bf0f46e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HLHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Набор методов для работы с highloadblock Bitrix
* User: darkfriend <hi@darkfriend.ru>
* Date: 25.04.2017
* @version 1.0.4
* @version 1.0.5
*/

namespace Darkfriend;
Expand Down
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
+ [Получить все highloadblock](#ListHighloadBlock)
+ [Создать HighloadBlockTable](#CreateHighloadBlock)
+ [Добавить поле в HighloadBlockTable](#AddFieldHighloadBlock)
+ [Обновить поле в HighloadBlockTable по ID](#UpdateFieldHighloadBlock)
+ [Обновить поле в HighloadBlockTable по UF_NAME](#UpdateFieldHighloadBlockByUF)
+ [Удалить поле или поля в HighloadBlockTable](#DeleteFieldHighloadBlock)
+ [Удалить HighloadBlockTable](#DeleteHighloadBlock)
* Работа с элементами
Expand Down Expand Up @@ -84,6 +86,60 @@
?>
```

### <a name="UpdateFieldHighloadBlock"></a> Обновить поле в HighloadBlockTable по ID

```php
<?php
use Darkfriend\HLHelpers;
$hlblockID = 1;
$fieldID = 1;
$arField = [
'SORT' => '100',
'MANDATORY' => 'Y',
'SETTINGS' => [
'DEFAULT_VALUE' => 'empty',
],
'EDIT_FORM_LABEL' => [
'ru' => 'Тестовое поле',
'en' => 'Test field',
],
'LIST_COLUMN_LABEL' => [
'ru' => 'Тестовое поле',
'en' => 'Test field',
],
];
$id = HLHelpers::getInstance()->updateField($hlblockID, $fieldID, $arField);
print_r($id); // bool, как результат
?>
```

### <a name="UpdateFieldHighloadBlockByUF"></a> Обновить поле в HighloadBlockTable по UF_NAME

```php
<?php
use Darkfriend\HLHelpers;
$hlblockID = 1;
$ufName = 'UF_TEST';
$arField = [
'SORT' => '100',
'MANDATORY' => 'Y',
'SETTINGS' => [
'DEFAULT_VALUE' => 'empty',
],
'EDIT_FORM_LABEL' => [
'ru' => 'Тестовое поле',
'en' => 'Test field',
],
'LIST_COLUMN_LABEL' => [
'ru' => 'Тестовое поле',
'en' => 'Test field',
],
];
$id = HLHelpers::getInstance()->updateFieldByName($hlblockID, $ufName, $arField);
print_r($id); // bool, как результат
?>
```

### <a name="DeleteFieldHighloadBlock"></a> Удалить поле или поля в HighloadBlockTable

```php
Expand Down

0 comments on commit bf0f46e

Please sign in to comment.