Skip to content

Instantly share code, notes, and snippets.

@johnwards
Created April 11, 2011 14:42
Show Gist options
  • Save johnwards/913620 to your computer and use it in GitHub Desktop.
Save johnwards/913620 to your computer and use it in GitHub Desktop.
<?php
namespace WhiteOctober\FormBuilderBundle\Model;
use Symfony\Component\Serializer\Normalizer\NormalizableInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* Model\WhiteOctoberFormBuilderBundle\Form bundle document.
*/
abstract class Form extends \Model\WhiteOctoberFormBuilderBundle\Base\Form implements NormalizableInterface
{
/**
* @param NormalizerInterface $normalizer
* @param $format
* @param null $properties
* @return void
*/
public function normalize(NormalizerInterface $normalizer, $format, $properties = null)
{
return $this->data['fields'];
}
public function denormalize(NormalizerInterface $normalizer, $data, $format = null)
{
$this->data['fields'] = $data;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment