src/Factory/TaxonDetailsViewFactory.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 48-57 (lines=10) @@
                                 | 
                            
                                                            
                                    | 45 | 
                                     | 
                                            return $currentTaxonView;  | 
                                
                                                            
                                    | 46 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 47 | 
                                     | 
                                     | 
                                
                                                            
                                    | 48 | 
                                     | 
                                        private function buildTaxonView(TaxonInterface $taxon, $locale): TaxonView  | 
                                
                                                            
                                    | 49 | 
                                     | 
                                        { | 
                                
                                                            
                                    | 50 | 
                                     | 
                                            $taxonView = $this->taxonViewFactory->create($taxon, $locale);  | 
                                
                                                            
                                    | 51 | 
                                     | 
                                     | 
                                
                                                            
                                    | 52 | 
                                     | 
                                            foreach ($taxon->getChildren() as $childTaxon) { | 
                                
                                                            
                                    | 53 | 
                                     | 
                                                $taxonView->children[] = $this->buildTaxonView($childTaxon, $locale);  | 
                                
                                                            
                                    | 54 | 
                                     | 
                                            }  | 
                                
                                                            
                                    | 55 | 
                                     | 
                                     | 
                                
                                                            
                                    | 56 | 
                                     | 
                                            return $taxonView;  | 
                                
                                                            
                                    | 57 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 58 | 
                                     | 
                                    }  | 
                                
                                                            
                                    | 59 | 
                                     | 
                                     | 
                                
                                                                        
                 
                                                            
                    
src/Controller/Taxon/ShowTaxonTreeAction.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 55-64 (lines=10) @@
                                 | 
                            
                                                            
                                    | 52 | 
                                     | 
                                            return $this->viewHandler->handle(View::create($taxonViews, Response::HTTP_OK));  | 
                                
                                                            
                                    | 53 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 54 | 
                                     | 
                                     | 
                                
                                                            
                                    | 55 | 
                                     | 
                                        private function buildTaxonView(TaxonInterface $taxon, $locale): TaxonView  | 
                                
                                                            
                                    | 56 | 
                                     | 
                                        { | 
                                
                                                            
                                    | 57 | 
                                     | 
                                            $taxonView = $this->taxonViewFactory->create($taxon, $locale);  | 
                                
                                                            
                                    | 58 | 
                                     | 
                                     | 
                                
                                                            
                                    | 59 | 
                                     | 
                                            foreach ($taxon->getChildren() as $childTaxon) { | 
                                
                                                            
                                    | 60 | 
                                     | 
                                                $taxonView->children[] = $this->buildTaxonView($childTaxon, $locale);  | 
                                
                                                            
                                    | 61 | 
                                     | 
                                            }  | 
                                
                                                            
                                    | 62 | 
                                     | 
                                     | 
                                
                                                            
                                    | 63 | 
                                     | 
                                            return $taxonView;  | 
                                
                                                            
                                    | 64 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 65 | 
                                     | 
                                    }  | 
                                
                                                            
                                    | 66 | 
                                     | 
                                     |