Skip to content
Snippets Groups Projects
Commit 6d5c493f authored by Aivaras Gotovskis's avatar Aivaras Gotovskis
Browse files

Add field argument to aggregation constructor.

parent 9582224e
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