getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $this->getEmailFolderService()->moveUp($data->id); return true; } /** * @throws BadRequest * @throws Forbidden * @throws Error * @throws NotFound */ public function postActionMoveDown(Request $request): bool { $data = $request->getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $this->getEmailFolderService()->moveDown($data->id); return true; } public function getActionListAll(): stdClass { $list = $this->getEmailFolderService()->listAll(); return (object) ['list' => $list]; } private function getEmailFolderService(): Service { return $this->injectableFactory->create(Service::class); } }