This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace YourBundle\Serializer; | |
| use JMS\Serializer\GenericSerializationVisitor; | |
| use JMS\Serializer\Handler\FormErrorHandler as JMSFormErrorsHandler; | |
| use JMS\Serializer\JsonSerializationVisitor; | |
| use Symfony\Component\Form\Form; | |
| use Symfony\Component\Form\FormError; | |
| use Symfony\Component\Translation\TranslatorInterface; | |
| class YourErrorsHandler extends JMSFormErrorsHandler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Hateoas\Representation\Factory; | |
| use Hateoas\Configuration\Route; | |
| use Hateoas\Representation\CollectionRepresentation; | |
| use Hateoas\Representation\PaginatedRepresentation; | |
| use Knp\Component\Pager\Pagination\SlidingPagination; | |
| class KnpPaginatorFactory | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FormErrorsSerializer { | |
| public function serializeFormErrors(\Symfony\Component\Form\Form $form, $flat_array = false, $add_form_name = false, $glue_keys = '_') | |
| { | |
| $errors = array(); | |
| $errors['global'] = array(); | |
| $errors['fields'] = array(); | |
| if(!empty($form->getConfig()->getDataClass())) | |
| { |