Example #1
0
 /**
  * Redirect an old project to a new project.
  */
 public function projectAction()
 {
     $this->getProjectService()->setProjectId((int) $this->getRequest()->getQuery()->get('project'));
     /*
      * Return a 404 when no project can be found
      */
     if ($this->getProjectService()->isEmpty()) {
         return $this->notFoundAction();
     }
     $project = new Project();
     return $this->redirect()->toRoute('route-' . $project->get('underscore_full_entity_name'), ['docRef' => $this->getProjectService()->getProject()->getDocRef()])->setStatusCode(301);
 }
Example #2
0
 public function testGetFunctions()
 {
     $project = new Project();
     $this->assertNotNull($project->get('entity_name'));
     $this->assertNotNull($project->get('dashed_entity_name'));
     $this->assertNotNull($project->get('underscore_entity_name'));
 }