view = $view; } /** * @param $user */ public function __invoke( $user ) { $state = get_user_meta( $user->ID, UserState::FL_ASSISTANT_STATE, true ); $state = $state ? $state : UserState::$default_state; $window = $state['window']; $this->view->render( 'user-profile', [ 'show_in_admin' => $state['shouldShowInAdmin'], 'window' => $window, 'hidden_appearance' => isset( $window['hiddenAppearance'] ) ? $window['hiddenAppearance'] : '', 'hidden_appearances' => [ '' => __( 'Button (Default)', 'fl-assistant' ), 'admin_bar' => __( 'Admin Bar Item', 'fl-assistant' ), ], ] ); } }