From 6d23d26c31619ed9d22ac9373da49d0ca7867b23 Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Wed, 8 Jul 2015 15:51:47 +0300
Subject: [PATCH] Add add type argument to children aggregation.

---
 src/Aggregation/ChildrenAggregation.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/Aggregation/ChildrenAggregation.php b/src/Aggregation/ChildrenAggregation.php
index f87b1d9..6782ce8 100644
--- a/src/Aggregation/ChildrenAggregation.php
+++ b/src/Aggregation/ChildrenAggregation.php
@@ -35,6 +35,17 @@ class ChildrenAggregation extends AbstractAggregation
         return $this->children;
     }
 
+    /**
+     * @param string $name
+     * @param string $children
+     */
+    public function __construct($name, $children = null)
+    {
+        parent::__construct($name);
+
+        $this->setChildren($children);
+    }
+
     /**
      * Sets children.
      *
-- 
GitLab