Daniel@0: get('request')->getHttpHost(), 'mirg') !== false; Daniel@0: Daniel@0: if ($swapAPIs) { Daniel@0: $bubble = $defaultApiRootPaths; Daniel@0: $defaultApiRootPaths = $alternativeApiRootPaths; Daniel@0: $alternativeApiRootPaths = $bubble; Daniel@0: } Daniel@0: Daniel@0: return array ( Daniel@0: 'enableJasmine' => $this->get('request')->query->has('jasmine'), // JS behaviour tests powered by jasmine.js Daniel@0: //'enableJasmine' => true, Daniel@0: 'musicLibrary' => array( Daniel@0: 'dataVersion' => 2, Daniel@0: 'dataCaching' => !$this->get('request')->query->has('no_data_caching'), Daniel@0: //'apiRootPaths' => array('http://mirg.city.ac.uk/dmlapi/api/'), Daniel@0: //'apiRootPaths' => array('//lewes.nsqdc.city.ac.uk:3020/cp/api/'), Daniel@0: 'apiRootPaths' => $this->get('request')->query->has('api2') Daniel@0: ? $alternativeApiRootPaths Daniel@0: : $defaultApiRootPaths, Daniel@0: 'defaultApiRootPaths' => $defaultApiRootPaths, Daniel@0: 'apiVersion' => 4 Daniel@0: ), Daniel@0: 'project' => $this->container->getParameter('anonymous') Daniel@0: ? array( Daniel@0: 'shortTitle' => ' ◦◦◦', Daniel@0: 'title' => 'Anonymous Project', Daniel@0: 'anonymous' => false Daniel@0: ) Daniel@0: : array( Daniel@0: 'shortTitle' => 'DML', Daniel@0: 'title' => 'Digital Music Lab', Daniel@0: 'anonymous' => false Daniel@0: ) Daniel@0: ); Daniel@0: } Daniel@0: Daniel@0: /** Daniel@0: * @Route("/web/") Daniel@0: * @Template() Daniel@0: */ Daniel@0: public function redirectFromWebAction() Daniel@0: { Daniel@0: return $this->redirect($this->generateUrl("default_index"), 301); Daniel@0: } Daniel@0: Daniel@0: }