dbi = $dbi; $this->structureController = $structureController; } public function __invoke(): void { global $db, $message; $selected = $_POST['selected_tbl'] ?? []; if (empty($selected)) { $this->response->setRequestStatus(false); $this->response->addJSON('message', __('No table selected.')); return; } $centralColumns = new CentralColumns($this->dbi); $error = $centralColumns->makeConsistentWithList($db, $selected); $message = $error instanceof Message ? $error : Message::success(__('Success!')); unset($_POST['submit_mult']); ($this->structureController)(); } }