Skip to content

Commit

Permalink
Обновление документации.
Browse files Browse the repository at this point in the history
Добавлен пример с обновлением инфоблока по ссылке
  • Loading branch information
garr1nch4 authored Sep 7, 2019
1 parent ba777a9 commit f9561d3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/builders.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,26 @@ $builder->updateIblock($id, function (Iblock $iblock) {
});
```

##### Обновление инфоблока по ссылке

```php
<?php

$builder = new \WS\ReduceMigrations\Builder\IblockBuilder();
$builder->updateIblockByPointer(
\WS\ReduceMigrations\Builder\IblockPointer::byCode(DOMAIN_IBLOCK_NEWS),
function (\WS\ReduceMigrations\Builder\Entity\Iblock $iblock) {
$prop = $iblock->addProperty('Тип')
->code('type')
->typeDropdown();

$prop->addEnum('Главная новость')->xmlId('main');
$prop->addEnum('Срочная новость')->xmlId('hot');
$prop->addEnum('Эксклюзив')->xmlId('exclusive');
}
);
```

### 2. Работа с таблицами. ```TableBuilder``` <a name="TableBuilder"></a>

##### Добавление таблицы
Expand Down

0 comments on commit f9561d3

Please sign in to comment.