tactics = $tactics; } private function openEditor(TacticInfo $tactic) { send_react_front("views/Editor.tsx", ["name" => $tactic->getName(), "id" => $tactic->getId()]); } public function makeNew() { $info = $this->tactics->insert(self::TACTIC_DEFAULT_NAME); $this->openEditor($info); } public function edit(int $id) { $tactic = $this->tactics->get($id); $this->openEditor($tactic); } }