Skip to content
Snippets Groups Projects
Commit 79e04cdd authored by Simonas Šerlinskas's avatar Simonas Šerlinskas
Browse files

Merge pull request #12 from GrandLTU/add-field-argument-to-aggregations

Add field argument to aggregation constructor.
parents e3805754 6d5c493f
No related branches found
No related tags found
No related merge requests found
......@@ -60,10 +60,14 @@ abstract class AbstractAggregation implements NamedBuilderInterface
* Inner aggregations container init.
*
* @param string $name
* @param string $field
*/
public function __construct($name)
public function __construct($name, $field = null)
{
$this->name = $name;
if ($field !== null) {
$this->setField($field);
}
$this->aggregations = new NamedBuilderBag();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment