Interface rootlocal\widgets\sortable\SortableGridBehaviorInterface

Implemented byrootlocal\widgets\sortable\SortableGridBehavior

Interface SortableGridBehaviorInterface

Public Methods

Hide inherited 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

Hide inherited methods

getSortableAttribute() public abstract method

Getting Database field name for row sorting default value: sort_order

public abstract string getSortableAttribute ( )

                public function getSortableAttribute(): string;

            
gridSort() public abstract method

Сортировка строк таблицы перетаскиванием "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' => primary_key_value, 'sort_id' => sort_value]]

throws \yii\base\InvalidConfigException
throws Throwable

                public function gridSort(array $items = []): array;

            
gridSortUpOrDownButton() public abstract method

Сортировка строк таблицы нажатием на кнопки 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' => primary_key_value, 'sort_id' => sort_value]]

throws \yii\web\BadRequestHttpException

                public function gridSortUpOrDownButton(string $button, int $id): array;

            
setSortableAttribute() public abstract method

Setting Database field name for row sorting

public abstract void setSortableAttribute ( string $sortableAttribute )
$sortableAttribute string

                public function setSortableAttribute(string $sortableAttribute): void;