Add record count property to story responses

This commit is contained in:
Thibaud Fabre
2016-06-28 15:30:20 +02:00
parent 5648f3219c
commit 3498b835d5
2 changed files with 1 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ class StoryTransformer extends TransformerAbstract
'collection_id' => $story->getCollectionId(), 'collection_id' => $story->getCollectionId(),
'base_id' => $story->getBaseId(), 'base_id' => $story->getBaseId(),
'uuid' => $story->getUuid(), 'uuid' => $story->getUuid(),
'record_count' => count($storyView->getChildren())
]; ];
} }

View File

@@ -31,7 +31,6 @@ class StoryView
*/ */
public function __construct(\record_adapter $story) public function __construct(\record_adapter $story)
{ {
$this->story = $story; $this->story = $story;
} }