Example #1
0
 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);
 }
Example #2
0
 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);
 }