protected function getMapLocationsPrograms() {
    $map = [];

    $cid = __METHOD__;
    if ($cache = $this->cache->get($cid)) {
      return $cache->data;
    }

    $programs = $this->getAllChildCarePrograms();
    foreach ($programs as $program) {
      $locations = $this->getLocationsByChildCareProgramId($program->id);
      foreach ($locations as $lid) {
        $map[$lid][$program->id] = $program->id;
      }
    }

    $this->cache->set($cid, $map);
    return $map;
  }
protected function getMapLocationsPrograms() {
    $map = [];

    $cid = __METHOD__;
    if ($cache = $this->cache->get($cid)) {
      return $cache->data;
    }

    $programs = $this->getAllChildCarePrograms();
    foreach ($programs as $program) {
      $locations = $this->getLocationsByChildCareProgramId($program->id);
      foreach ($locations as $lid) {
        $map[$lid][$program->id] = $program->id;
      }
    }

    $this->cache->set($cid, $map);
    return $map;
  }
protected function getMapLocationsPrograms ( ) { $ map = [ ] ; $ cid = __METHOD__ ; if ( $ cache = $ this -> cache -> get ( $ cid ) ) { return $ cache -> data ; } $ programs = $ this -> getAllChildCarePrograms ( ) ; foreach ( $ programs as $ program ) { $ locations = $ this -> getLocationsByChildCareProgramId ( $ program -> id ) ; foreach ( $ locations as $ lid ) { $ map [ $ lid ] [ $ program -> id ] = $ program -> id ; } } $ this -> cache -> set ( $ cid , $ map ) ; return $ map ; }
Return map for locations and programs.

@return array
The list of mappings.

@ingroup cache
Return map for locations and programs .