Interface rootlocal\widgets\sortable\SortableGridBehaviorInterface
| Implemented by | rootlocal\widgets\sortable\SortableGridBehavior |
|---|
Interface SortableGridBehaviorInterface
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getSortableAttribute() | Getting Database field name for row sorting default value: sort_order | rootlocal\widgets\sortable\SortableGridBehaviorInterface |
| gridSort() | Сортировка строк таблицы перетаскиванием "Drag-and-drop" | rootlocal\widgets\sortable\SortableGridBehaviorInterface |
| gridSortUpOrDownButton() | Сортировка строк таблицы нажатием на кнопки up или down | rootlocal\widgets\sortable\SortableGridBehaviorInterface |
| setSortableAttribute() | Setting Database field name for row sorting | rootlocal\widgets\sortable\SortableGridBehaviorInterface |
Method Details
Getting Database field name for row sorting default value: sort_order
| public abstract string getSortableAttribute ( ) |
public function getSortableAttribute(): string;
Сортировка строк таблицы перетаскиванием "Drag-and-drop"
| public abstract array gridSort ( array $items = [] ) | ||
| $items | array |
['old_primary_key' => 'new_primary_key'] |
| return | array |
New values attributes (new sorted values)
[['id' => |
|---|---|---|
| throws | \yii\base\InvalidConfigException | |
| throws | Throwable | |
public function gridSort(array $items = []): array;
Сортировка строк таблицы нажатием на кнопки up или down
| public abstract array gridSortUpOrDownButton ( string $button, integer $id ) | ||
| $button | string |
String name "up" or "down" action button |
| $id | integer |
Primary Key value Model |
| return | array |
New values models New values attributes (new sorted values)
[['id' => |
|---|---|---|
| throws | \yii\web\BadRequestHttpException | |
public function gridSortUpOrDownButton(string $button, int $id): array;
Setting Database field name for row sorting
| public abstract void setSortableAttribute ( string $sortableAttribute ) | ||
| $sortableAttribute | string | |
public function setSortableAttribute(string $sortableAttribute): void;