protected function getFields(): ?array
    {
        $fields = $this->requestStack->getCurrentRequest()->get('fields');

        if (!is_null($fields)) {
            $fields = array_map('trim', explode(',', $fields));
        }

        return $fields;
    }
protected function getFields(): ?array
    {
        $fields = $this->requestStack->getCurrentRequest()->get('fields');

        if (!is_null($fields)) {
            $fields = array_map('trim', explode(',', $fields));
        }

        return $fields;
    }
protected function getFields ( ) : ? array { $ fields = $ this -> requestStack -> getCurrentRequest ( ) -> get ( 'fields' ) ; if ( ! is_null ( $ fields ) ) { $ fields = array_map ( 'trim' , explode ( ',' , $ fields ) ) ; } return $ fields ; }
You can restrict the fields you desire to see

@return array|null
You can restrict the fields you desire to see