getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $id = $data->id; return $this->getArticleService()->getCopiedAttachments($id); } public function postActionMoveToTop(Request $request): bool { $data = $request->getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $where = null; if (!empty($data->where)) { $where = json_decode(Json::encode($data->where), true); } $this->getArticleService()->moveToTop($data->id, $where); return true; } public function postActionMoveUp(Request $request): bool { $data = $request->getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $where = null; if (!empty($data->where)) { $where = json_decode(Json::encode($data->wher), true); } $this->getArticleService()->moveUp($data->id, $where); return true; } public function postActionMoveDown(Request $request): bool { $data = $request->getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $where = null; if (!empty($data->where)) { $where = json_decode(Json::encode($data->where), true); } $this->getArticleService()->moveDown($data->id, $where); return true; } public function postActionMoveToBottom(Request $request): bool { $data = $request->getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $where = null; if (!empty($data->where)) { $where = json_decode(Json::encode($data->where), true); } $this->getArticleService()->moveToBottom($data->id, $where); return true; } private function getArticleService(): Service { /** @var Service */ return $this->getRecordService(); } }