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

Add media field to custom entity #172

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simoncarre
Copy link

Add JS files to manage media fields on custom entity


pim_customentity_media_rest_post:
path: '/rest/customentity_media'
defaults: { _controller: pim_custom_entity.media_rest_controller.class:postAction }

Choose a reason for hiding this comment

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

@simoncarre here should be the name of the service pim_custom_entity.media_rest_controller , not the class. I got issue here

@sylvainraye
Copy link

Tested on my side and works well, except the comment regarding service name. Thanks a lot @simoncarre for sharing

@simoncarre
Copy link
Author

Thank you @diglin for your test.
Fixed!

@jmleroux
Copy link
Contributor

Hello @simoncarre ,
I asked review to some of my teammates.

Could you please also check what is failing on Travis?

{
/** @var \Symfony\Component\HttpFoundation\File\UploadedFile $file */
$file = $request->files->get('file');
$violations = $this->validator->validate($file);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add an example of file validation in the AcmeCustomBundle ?

@mmetayer
Copy link
Collaborator

mmetayer commented Mar 29, 2018

Hi @simoncarre, thank you so much for your contribution, this PR seems really promising !
Before I can review it, though, could you rebase against the master branch?
Also, there are 2 tests failing (in docs/examples/CustomBundle/spec/Normalizer/Standard/BrandNormalizerSpec.php and Tests/Jobs/Export/CustomEntityExportTest.php), could you please fix them?

class MediaRestController
{
/**
* Validator interface
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed comment line

protected $validator;

/**
* Path generator
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed comment line

@dimitri-koenig
Copy link

@simoncarre: Hey Simon, any updates here? Would be very nice and extremely helpful to have this feature included in this bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants