Commit 0105d29d authored by Nicolò Caruso's avatar Nicolò Caruso
Browse files

BAT-31: Use EventFormatter

parent 54cf0e7e
......@@ -8,6 +8,7 @@ use Drupal\bat\Event;
use Drupal\bat\Calendar;
use Drupal\bat\DrupalDBStore;
use Drupal\bat\Unit;
use Drupal\bat_event\EventFormatter;
/**
* Implements hook_ctools_plugin_api().
......@@ -567,7 +568,8 @@ function bat_api_services_events_index($unit_ids, $start_date, $duration, $type)
if (isset($events[$id])) {
foreach ($events[$id] as $event) {
$events_json[$id][] = $event->formatJson($event_style);
$event_formatter = new EventFormatter($event);
$events_json[$id][] = $event_formatter->formatJson($type);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment