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