tbn / getsetforeignnormalizer-bundle
Add the getsetforeignnormalizer service
Installs: 8 257
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
pkg:composer/tbn/getsetforeignnormalizer-bundle
Requires (Dev)
- php: >=5.3.0
- doctrine/data-fixtures: ^1.1
- doctrine/doctrine-bundle: >=1.4
- doctrine/orm: ~2.2,>=2.2.3,<2.5
- nelmio/alice: >=2.1
- phpunit/phpunit: ~4.4
- sensio/distribution-bundle: >=4.0
- sensio/framework-extra-bundle: ~3.0,>=3.0.2
- symfony/class-loader: 2.3.*
- symfony/symfony: >=2.7
- twig/extensions: >=1.0
README
DEPRECATED: This bundle is not usefull anymore, use Symfony serializer/normalizer instead
This bundle gives a service that permits to normalize a doctrine entity.
The entity is normalized and the ids of the foreign entities of the entity are also normalized.
Install
composer require "tbn/getsetforeignnormalizer-bundle"
Usage
Get the service in your controller
$normalizer = $this->get('get_set_foreign_normalizer');
If you do not want to normalize some attributes, use the setIgnoredAttributes parameter
$normalizer->normalize($entities, true, false, array('allImages'));//avoid the getAllImages function
The foreign entities are not fully normalized by default
You can normalize all entities using
$normalizer->normalize($entities, true);