page = $page; $this->action = $action; } public function get(): string { return $this->create_url(); } private function create_url(): string { $url = get_admin_url(); $url .= 'admin.php?'; $query = []; $query['page'] = $this->page; if ( ! empty( $this->action ) ) { $query['twofas_light_action'] = $this->action; } $url .= http_build_query( $query ); return $url; } }