/**
  * @return \yii\db\ActiveQuery
  */
 protected function getQuery()
 {
     return parent::getQuery()->addSelect($this->sortAttribute)->orderBy([$this->sortAttribute => SORT_ASC]);
 }
Exemplo n.º 2
0
 public function actionMoveToPosition()
 {
     $this->_model->moveToPosition(Yii::$app->request->post('position'));
 }