settings_page = $settings_page; } /** * {@inheritDoc} */ public function get_page_id(): string { return $this->settings_page->get_id(); } /** * Build the canonical settings schema for a section. * * @param string $section Section id. Empty string means the default section. * @return array * @throws \InvalidArgumentException When legacy settings contain duplicate group ids. */ public function get_schema( string $section ): array { return SettingsUISchema::from_legacy_settings( $this->settings_page->get_id(), $section, $this->settings_page->get_label(), $this->settings_page->get_settings( $section ), $this->get_save_adapter( $section ) ); } /** * Get script handles that must be loaded before the settings UI app mounts. * * @param string $section Section id. Empty string means the default section. * @return string[] */ public function get_script_handles( string $section ): array { return array(); } /** * Get the default save adapter for fields on this page. * * @param string $section Section id. Empty string means the default section. * @return string */ public function get_save_adapter( string $section ): string { return 'form_post'; } }