Return StopPoints list with Data from navitia

@param array $stopPointNavitiaIds Array of Stoppoints NavitiaId

@return array
346049
public function enhanceStopPoints($stopPoints, $timetable)
    {
        $externalStopPointIds = array();
        $stopPointsIndexed = array();
        // extract externalStopPointIds to prepare SQL WHERE IN
        foreach ($stopPoints as $stopPoint_data) {
            $externalStopPointIds[] = $stopPoint_data->stop_point->id;
            // and index by navitia Id to make it easy to find an item inside
            $stopPointsIndexed[$stopPoint_data->stop_point->id] = $stopPoint_data;
        }
        $query = $this->om
            ->createQueryBuilder()
            ->addSelect('stopPoint')
            ->where("stopPoint.externalId IN(:externalStopPointIds)")
            ->from('CanalTPMttBundle:StopPoint', 'stopPoint')
            ->setParameter('externalStopPointIds', array_values($externalStopPointIds))
            ->andWhere("stopPoint.timetable = :timetableId")
            ->setParameter('timetableId', $timetable->getId())
            ->getQuery();
        $db_stop_points = $query->getResult();
        // add pdf generation date and Hash to stop points
        foreach ($db_stop_points as $db_stop_point) {
            if (isset($stopPointsIndexed[$db_stop_point->getExternalId()])) {
                $stopPointsIndexed[$db_stop_point->getExternalId()]->stop_point->pdfGenerationDate = $db_stop_point->getPdfGenerationDate();
                $stopPointsIndexed[$db_stop_point->getExternalId()]->stop_point->pdfHash = $db_stop_point->getPdfHash();
            }
        }

        return $stopPointsIndexed;
    }
331168
public function getDashboardNavigationGroups()
    {
        $groups = $this->getDashboardGroups();

        $menuGroups = $this->getContainer()->getParameter('networking_init_cms.admin_menu_groups');

        foreach ($menuGroups as $key => $menuGroup) {
            foreach ($menuGroup['items'] as $k => $item) {
                if (array_key_exists($item, $groups)) {
                    $menuGroups[$key]['sub_group'][$k] = $groups[$item];
                }
            }
        }

        return $menuGroups;
    }
138091
public function getDashboardRecentProspectData(){
        $select = $this->tableGateway->getSql()->select();
        $select->order('pros_id DESC');
        $select->limit(5);
        $dataProspects = $this->tableGateway->selectWith($select);
        
        return $dataProspects;
    }
1328161
public function getPoints()
	{
		/** @var Point[] $points */
		$points = [];

		$points = array_merge($points, $this->points);

		if (phpGPX::$SORT_BY_TIMESTAMP && !empty($points)) {
			usort($points, array('phpGPX\Helpers\DateTimeHelper', 'comparePointsByTimestamp'));
		}

		return $points;
	}
268641
public static function hydrateCollection(array $entrypoints)
    {
        $hydrated = [];

        foreach ($entrypoints as $entrypoint) {
            $hydrated[] = self::hydrate($entrypoint);
        }

        return $hydrated;
    }
34629
public static function getRoutesDataFromData(array $data): array
    {
        assert(array_key_exists(self::KEY_ROUTES_DATA, $data));
        $result = $data[self::KEY_ROUTES_DATA];

        return $result;
    }
1347461
def getServiceEndpoints(self, yadis_url, service_element):
        """"""
        endpoints = []
        for subfilter in self.subfilters:
            endpoints.extend(
                subfilter.getServiceEndpoints(yadis_url, service_element))
        return endpoints
718637
public static function get_user_navigation_options($courseids) {
        global $CFG;
        require_once($CFG->dirroot . '/course/lib.php');

        // Parameter validation.
        $params = self::validate_parameters(self::get_user_navigation_options_parameters(), array('courseids' => $courseids));
        $courseoptions = array();

        list($courses, $warnings) = external_util::validate_courses($params['courseids'], array(), true);

        if (!empty($courses)) {
            foreach ($courses as $course) {
                // Fix the context for the frontpage.
                if ($course->id == SITEID) {
                    $course->context = context_system::instance();
                }
                $navoptions = course_get_user_navigation_options($course->context, $course);
                $options = array();
                foreach ($navoptions as $name => $available) {
                    $options[] = array(
                        'name' => $name,
                        'available' => $available,
                    );
                }

                $courseoptions[] = array(
                    'id' => $course->id,
                    'options' => $options
                );
            }
        }

        $result = array(
            'courses' => $courseoptions,
            'warnings' => $warnings
        );
        return $result;
    }
1373224
public function getNavs()
    {
        return $this->hasMany(Nav::className(), ['nav_container_id' => 'id'])->where(['is_deleted' => false, 'is_draft' => false])->orderBy(['sort_index' => SORT_ASC]);
    }
162987
public function getStopPointCalendarsData($externalCoverageId, $externalRouteId, $externalStopPointId)
    {
        $query = array(
            'api' => 'coverage',
            'parameters' => array(
                'region' => $externalCoverageId,
                'action' => 'calendars',
                'path_filter' => 'routes/'.$externalRouteId.'/stop_points/'.$externalStopPointId,
                'parameters' => '?count=100',
            ),
        );

        return $this->navitia_component->call($query);
    }
150357
private function getLocationChoices(array $locations): array
    {
        $locationIds = array_column($locations, 'id');

        return array_combine($locationIds, array_fill_keys($locationIds, false));
    }
596533
private function getLocations($locations)
    {
        $array=[];
        foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */
            array_push(
                $array,
                [
                    '@type' => 'Place',
                    'address' => [
                        '@type' => 'PostalAddress',
                        'streetAddress' => $location->getStreetname() .' '.$location->getStreetnumber(),
                        'postalCode' => $location->getPostalCode(),
                        'addressLocality' => $location->getCity(),
                        'addressCountry' => $location->getCountry(),
                        'addressRegion' => $location->getRegion(),
                    ]
                ]
            );
        }
        return $array;
    }
37867
protected function endpointsAliasToRealNames($endpoints)
    {
        foreach ($endpoints as $index => $endpointName) {
            foreach ($this->endpointAlias as $alias => $targets) {
                if ($alias === $endpointName) {
                    $targets = $this->endpointsAliasToRealNames($targets);
                    unset($endpoints[$index]);
                    $endpoints = array_merge($endpoints, $targets);
                }
            }
        }

        return $endpoints;
    }
1327632
private function getCharacterAssetLocations(): array
    {

        $assets = CharacterAsset::where('character_id', $this->getCharacterId())
            ->where('location_flag', 'Hangar')
            ->where('location_type', 'other')
            // Asset Safety
            ->where('location_id', '<>', self::ASSET_SAFETY)
            // Solar Systems
            ->whereNotBetween('location_id', self::SOLAR_SYSTEMS_RANGE)
            // Bugged Assets
            ->whereNotBetween('location_id', self::BUGGED_ASSETS_RANGE)
            // Station / Outpost
            ->whereNotBetween('location_id', self::UPWELL_STRUCTURES_RANGE)
            // stuffs
            ->whereNotIn('location_id', function ($query) {
                $query->select('item_id')
                    ->from((new CharacterAsset)->getTable())
                    ->where('character_id', $this->getCharacterId())
                    ->distinct();
            })
            // Remove structures that already have a name resolved
            // within the last week.
            ->whereNotIn('location_id', function ($query) {

                $query->select('structure_id')
                    ->from((new UniverseStructure)->getTable())
                    ->where('name', '<>', 'Unknown Structure')
                    ->where('updated_at', '<', carbon('now')->subWeek());
            })
            ->select('location_id')->distinct()
            // Until CCP can sort out this endpoint, pick 30 random locations
            // and try to get those names. We hard cap it at 30 otherwise we
            // will quickly kill the error limit, resulting in a ban.
            ->inRandomOrder()
            ->limit(15)
            ->get();

        return $assets->map(function ($asset) {

            return $asset->location_id;

        })->all();
    }
416568
protected function getEndpointsWithResourceMethods(EndpointCollection $endpoints)
    {
        return Collection::make($endpoints)->filter(function ($endpoint) {
            return $endpoint instanceof MethodEndpoint &&
                    in_array($endpoint->method, $this->methods);
        })->all();
    }
1038121
public function getCenterOfPaths()
    {
        $paths = ArrayHelper::getValue($this->options, 'paths');

        return is_array($paths) && !empty($paths)
            ? LatLngBounds::getBoundsOfCoordinates($paths)->getCenterCoordinates()
            : null;
    }
166120
public function getAnnotationPointcuts(array &$pointcuts) : array
    {
        $keyPointcuts = [];
        foreach ($pointcuts as $key => $pointcut) {
            if ($pointcut->methodMatcher instanceof AnnotatedMatcher) {
                $key = $pointcut->methodMatcher->annotation;
            }
            $keyPointcuts[$key] = $pointcut;
        }

        return $keyPointcuts;
    }