/**
  * Saves images order according to request.
  * Variable $_POST['order'] - new arrange of image ids, to be saved
  * @throws HttpException
  */
 public function actionOrder($order)
 {
     if (count($order) == 0) {
         throw new HttpException(400, 'No data, to save');
     }
     $res = $this->behavior->arrange($order, $this->sort);
     return Json::encode($res);
 }