public function ajaxProgramsMoreInfo(Request $request) {
    $parameters = $request->query->all();
    $cid = md5(json_encode($parameters));
    $data = NULL;
    if ($cache = $this->cacheBackend->get($cid)) {
      $data = $cache->data;
    }
    else {
      $data = $this->backend->getProgramsMoreInfo($request);

      // Allow other modules to alter the search results.
      $this->moduleHandler()->alter('activity_finder_program_more_info', $data);

      // Cache for 5 minutes.
      $expire = $this->time->getRequestTime() + self::CACHE_LIFETIME;
      $this->cacheBackend->set($cid, $data, $expire);
    }

    return new JsonResponse($data);
  }
public function ajaxProgramsMoreInfo(Request $request) {
    $parameters = $request->query->all();
    $cid = md5(json_encode($parameters));
    $data = NULL;
    if ($cache = $this->cacheBackend->get($cid)) {
      $data = $cache->data;
    }
    else {
      $data = $this->backend->getProgramsMoreInfo($request);

      // Allow other modules to alter the search results.
      $this->moduleHandler()->alter('activity_finder_program_more_info', $data);

      // Cache for 5 minutes.
      $expire = $this->time->getRequestTime() + self::CACHE_LIFETIME;
      $this->cacheBackend->set($cid, $data, $expire);
    }

    return new JsonResponse($data);
  }
public function ajaxProgramsMoreInfo ( Request $ request ) { $ parameters = $ request -> query -> all ( ) ; $ cid = md5 ( json_encode ( $ parameters ) ) ; $ data = NULL ; if ( $ cache = $ this -> cacheBackend -> get ( $ cid ) ) { $ data = $ cache -> data ; } else { $ data = $ this -> backend -> getProgramsMoreInfo ( $ request ) ; // Allow other modules to alter the search results. $ this -> moduleHandler ( ) -> alter ( 'activity_finder_program_more_info' , $ data ) ; // Cache for 5 minutes. $ expire = $ this -> time -> getRequestTime ( ) + self :: CACHE_LIFETIME ; $ this -> cacheBackend -> set ( $ cid , $ data , $ expire ) ; } return new JsonResponse ( $ data ) ; }
Callback to retrieve programs full information.

@param \Symfony\Component\HttpFoundation\Request $request
@return \Symfony\Component\HttpFoundation\JsonResponse
Callback to retrieve programs full information .