Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added contact documents upload and fixed profile without avatar #101

Merged

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Aug 2, 2018

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Related PRs sulu/sulu#4092
License MIT

What's in this PR?

Added contact documents upload and fixed profile without avatar.

Why?

Sometimes you want to allow that a community user can upload files to its contact.

Example Usage

            $builder->add(
                'medias',
                FileType::class,
                [
                    'label' => 'attendance_confirmation',
                    'mapped' => false,
                    'required' => false,
                    'multiple' => true,
                ]
            );

BC Breaks/Deprecations

Did keep the saveAvatar function to avoid any bc breaks.

@alexander-schranz alexander-schranz force-pushed the feature/contact-documents-upload branch from 5e9905e to 3795637 Compare August 2, 2018 12:47
return $apiMedias;
}

protected function saveAvatar(FormInterface $form, User $user, $locale)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mark this method as deprecated then?

* with this source code in the file LICENSE.
*/

namespace Sulu\Bundle\CommunityBundle\Controller;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion this is a big trait.
Maybe create an service here?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that would call then always the service and if somebody did overwrite saveAvatar that function is never called.

@alexander-schranz alexander-schranz added this to the 1.1 milestone Aug 8, 2018
@wachterjohannes wachterjohannes merged commit 343f8ed into sulu:master Aug 13, 2018
@alexander-schranz alexander-schranz deleted the feature/contact-documents-upload branch August 13, 2018 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants