protected function handleView(View $view) { $handler = $this->get('fos_rest.view_handler'); $handler->setExclusionStrategyGroups($this->config->getSerializationGroups()); if ($version = $this->config->getSerializationVersion()) { $handler->setExclusionStrategyVersion($version); } return $handler->handle($view); }
protected function handleView(View $view) { $handler = $this->get('fos_rest.view_handler'); $handler->setExclusionStrategyGroups($this->config->getSerializationGroups()); if ($version = $this->config->getSerializationVersion()) { $handler->setExclusionStrategyVersion($version); } $view->getSerializationContext()->enableMaxDepthChecks(); return $handler->handle($view); }