confirm(); $this->photo(); } private function confirm() { $buttons = []; $buttons[] = new Button("Delete", BASEURL . '/' . $this->photo->getSlug() . '?delete_confirmed', "btn btn-red"); $buttons[] = new Button("Cancel", $this->photo->getPageUrl(), "btn"); $alert = new WarningDialog( "Confirm deletion.", "You are about to permanently delete the following photo.", $buttons ); $alert->html_content(); } }