src/Http/Controllers/Api/MenuController.php
protected function transformPresencesForApi($presences)
    {
        $response = [];

        foreach ($presences as $presence) {
            $response[] = $this->transformPresenceForApi($presence);
        }

        return $response;
    }
protected function transformPresencesForApi($presences)
    {
        $response = [];

        foreach ($presences as $presence) {
            $response[] = $this->transformPresenceForApi($presence);
        }

        return $response;
    }
protected function transformPresencesForApi ( $ presences ) { $ response = [ ] ; foreach ( $ presences as $ presence ) { $ response [ ] = $ this -> transformPresenceForApi ( $ presence ) ; } return $ response ; }
Transforms menu presence tree for API response.

@param Collection|MenuPresenceInterface[] $presences
@return array
Transforms menu presence tree for API response .