Skip to content

Conversation

@kanduvisla
Copy link

@kanduvisla kanduvisla commented Jan 31, 2018

This PR is a follow-up for GitHub issue #144.

I made some additions so the Custom Entity Bundle can properly handle localizable custom entities. I still want to add some unit tests and example code (or update the existing example module), but it would already be great if I could get some feedback if I'm on the right track.

Any feedback is welcome!

@kanduvisla kanduvisla changed the title GitHub 144 localizable custom entities GitHub 144 localizable custom entities (Addresses #144) Jan 31, 2018
@kanduvisla kanduvisla changed the title GitHub 144 localizable custom entities (Addresses #144) GitHub 144 localizable custom entities Jan 31, 2018
@fitn
Copy link
Contributor

fitn commented Jan 31, 2018

Wow thank you so much @kanduvisla

We will take care of your PR as soon as possible.
I am currently working on the export rework to handle more use cases here: #143 so feel free to take a look if you think we forgot something ;)

Cheers,

@sylvainraye
Copy link

This worked for me, thanks for sharing. However the denormalization part may be in conflict with the fixed issue #167

@ptitkosmos
Copy link

Hello,

I'm currently using translatable entities. Thanks for this commit. Will this PR merged soon ?

$translation->setLabel($value);

if ($this->propertyAccessor->isWritable($translation, $propertyPath)) {
$this->propertyAccessor->setValue($translation, $propertyPath, $value);

Choose a reason for hiding this comment

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

won't work for labels due to the final "S"


$value = $this->propertyAccessor->getValue($item, $property->getName());
$normalizedData[$property->getName()] = $this->normalizer->normalize($value, 'flat');
$value = $this->normalizer

Choose a reason for hiding this comment

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

Bug :
provokes an error
An error occurred during the export execution.

> Error #0 in class Doctrine\Common\Persistence\Mapping\MappingException: The class 'Doctrine\ORM\PersistentCollection' was not found in the chain configured name
> spaces Gedmo\Tree\Entity, Oro\Bundle\ConfigBundle\Entity, Oro\Bundle\UserBundle\Entity, Pim\Bundle\CustomEntityBundle\Entity, FOS\OAuthServerBundle\Entity, Pim\
> Bundle\UserBundle\Entity, Pim\Bundle\ApiBundle\Entity, Pim\Bundle\CatalogBundle\Entity, Pim\Bundle\CommentBundle\Entity, Pim\Bundle\DataGridBundle\Entity, Pim\B
> undle\NotificationBundle\Entity, Amepim\Bundle\CatalogBundle\Entity, Amepim\Bundle\CustomEntityBundle\Entity, Amepim\Bundle\DeletedEntityBundle\Entity, Akeneo\C
> omponent\Batch\Model, Akeneo\Component\BatchQueue\Queue, Akeneo\Component\FileStorage\Model, Pim\Component\Catalog\Model, Akeneo\Component\Versioning\Model

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.

6 participants