loadVars(); parent::render(); } protected function loadVars(): void { $secure_options = new SecureOptions(); $user_access_token = $secure_options->get('user_access_token', ''); $meta_businesses = new MetaBusinesses(); //$selected_business = $secure_options->get_selected_business(); //$phone = (new GraphClient())->get($selected_business['phone_id']); //var_dump($phone); //exit; $this->vars['businesses'] = $meta_businesses->getUserBusinesses($user_access_token, true); $this->vars['selected_business'] = $secure_options->get('selected_business', ''); $system_user_id = $secure_options->get('system_user_id', ''); $systemUser = new SystemUser($system_user_id); $this->vars['system_user_id'] = $system_user_id; $this->vars['system_user'] = $systemUser; $this->vars['system_user_token_is_valid'] = $systemUser->tokenIsValid(); $this->vars['link_to_app_roles'] = (new MetaSettings())->get_link_to_app_roles(); } protected function getViewPath() { return AFROMEWO_PLUGIN_DIR . 'includes/Admin/Settings/Views/tab-facebook_business.php'; } }