|
@@ -8,6 +8,7 @@ $metadata->xmlRootName = 'blog-post';
|
|
|
|
|
|
$pMetadata = new PropertyMetadata('JMS\SerializerBundle\Tests\Fixtures\BlogPost', 'title');
|
|
|
$pMetadata->type = 'string';
|
|
|
+$pMetadata->groups = array('comments','post');
|
|
|
$metadata->addPropertyMetadata($pMetadata);
|
|
|
|
|
|
$pMetadata = new PropertyMetadata('JMS\SerializerBundle\Tests\Fixtures\BlogPost', 'createdAt');
|
|
@@ -18,6 +19,7 @@ $metadata->addPropertyMetadata($pMetadata);
|
|
|
$pMetadata = new PropertyMetadata('JMS\SerializerBundle\Tests\Fixtures\BlogPost', 'published');
|
|
|
$pMetadata->type = 'boolean';
|
|
|
$pMetadata->serializedName = 'is_published';
|
|
|
+$pMetadata->groups = array('post');
|
|
|
$pMetadata->xmlAttribute = true;
|
|
|
$metadata->addPropertyMetadata($pMetadata);
|
|
|
|
|
@@ -26,10 +28,14 @@ $pMetadata->type = 'ArrayCollection<JMS\SerializerBundle\Tests\Fixtures\Comment>
|
|
|
$pMetadata->xmlCollection = true;
|
|
|
$pMetadata->xmlCollectionInline = true;
|
|
|
$pMetadata->xmlEntryName = 'comment';
|
|
|
+$pMetadata->groups = array('comments');
|
|
|
+
|
|
|
$metadata->addPropertyMetadata($pMetadata);
|
|
|
|
|
|
$pMetadata = new PropertyMetadata('JMS\SerializerBundle\Tests\Fixtures\BlogPost', 'author');
|
|
|
$pMetadata->type = 'JMS\SerializerBundle\Tests\Fixtures\Author';
|
|
|
+$pMetadata->groups = array('post');
|
|
|
+
|
|
|
$metadata->addPropertyMetadata($pMetadata);
|
|
|
|
|
|
return $metadata;
|