/** * Constructor. * * @param Inpsyde_Property_List_Interface $data * @param Mlp_Data_Access $database * @param wpdb $wpdb */ public function __construct(Inpsyde_Property_List_Interface $data, Mlp_Data_Access $database, wpdb $wpdb) { $this->plugin_data = $data; $this->wpdb = $wpdb; $this->page_title = __('Language Manager', 'multilingual-press'); $this->pagination_data = new Mlp_Language_Manager_Pagination_Data($database); $this->setting = new Mlp_Language_Manager_Options_Page_Data($this->page_title, $this->plugin_data->get('type_factory')); $this->nonce = new WPNonce($this->setting->action()); $this->view = new Mlp_Language_Manager_Page_View($this->setting, $this, $this->pagination_data, $this->nonce); $updater = new Mlp_Language_Updater($this->pagination_data, new Mlp_Array_Diff($this->get_columns()), $this->plugin_data->get('languages'), $this->nonce); add_action('admin_post_mlp_update_languages', [$updater, 'update_languages']); add_action('network_admin_menu', [$this, 'register_page'], 50); add_action("admin_post_{$this->reset_action}", [$this, 'reset_table']); }