Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getViewData(DocumentIterator $result, ViewData $data)
 {
     /** @var $data RangeAwareViewData */
     $data->setMinBounds(new \DateTime(date(\DateTime::ISO8601, $result->getAggregations()['date_range_agg']->getValue()['min'] / 1000)));
     $data->setMaxBounds(new \DateTime(date(\DateTime::ISO8601, $result->getAggregations()['date_range_agg']->getValue()['max'] / 1000)));
     return $data;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getViewData(DocumentIterator $result, ViewData $data)
 {
     /** @var $data ViewData\RangeAwareViewData */
     $data->setMinBounds($result->getAggregations()['range_agg']->getValue()['min']);
     $data->setMaxBounds($result->getAggregations()['range_agg']->getValue()['max']);
     return $data;
 }