ソースを参照

Se remueve controlador, no se utiliza.

Maximiliano Schvindt 8 年 前
コミット
44a3d3c6a7

+ 0 - 50
src/FTTHBundle/Controller/ONUController.php

@@ -1,50 +0,0 @@
-<?php
-
-namespace FTTHBundle\Controller;
-
-use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Symfony\Component\Workflow\Exception\ExceptionInterface;
-
-class ONUController extends Controller
-{
-
-    public function applyTransitionAction(\FTTHBundle\Entity\ONU $onu, $transition, $workflow = null)
-    {
-        if(is_null($workflow)) {
-            $workflow = "{$onu->getWorkflowType()}.{$onu->getWorkflow()}";
-        }
-
-        $em = $this->get('doctrine')->getManager();
-        try {
-            $this->get("{$workflow}")->apply($onu, $transition);
-            $em->persist($onu);
-            $em->flush();
-        } catch (ExceptionInterface $e) {
-            $this->get('session')->getFlashBag()->add('danger', $e->getMessage());
-        }
-
-        return $this->redirect($this->generateUrl('admin_ftth_onu_list'));
-    }
-
-    public function showWorkflowAction(\FTTHBundle\Entity\ONU $onu)
-    {
-        return $this->render('FTTHBundle:ONU:show_workflow.html.twig', ['onu' => $onu]);
-    }
-
-    public function resetStateAction(\FTTHBundle\Entity\ONU $onu)
-    {
-        $workflow = $onu->getWorkflowObject();
-
-        if($workflow) {
-            $onu->setCurrentState($workflow->getInitialPlace($onu));
-        } else {
-            $onu->setCurrentState(null);
-        }
-
-        $em = $this->get('doctrine')->getManager();
-        $em->persist($onu);
-        $em->flush();
-
-        return $this->redirect($this->generateUrl('admin_ftth_onu_list'));
-    }
-}

+ 0 - 15
src/FTTHBundle/Resources/config/routing/admin.xml

@@ -4,19 +4,4 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
 
-    <route id="admin_ftth_onu_apply_transition" path="/ftth/onu/apply_transition/{id}/{transition}">
-        <default key="_controller">FTTHBundle:ONU:applyTransition</default>
-        <default key="id">1</default>
-        <default key="transition">suspend_to_active</default>
-    </route>
-    
-    <route id="admin_ftth_onu_show_workflow" path="/ftth/onu/{id}/show_workflow">
-        <default key="_controller">FTTHBundle:ONU:showWorkflow</default>
-        <default key="id">1</default>
-    </route>
-    
-    <route id="admin_ftth_onu_reset_state" path="/ftth/onu/{id}/reset_state">
-        <default key="_controller">FTTHBundle:ONU:resetState</default>
-        <default key="id">1</default>
-    </route>
 </routes>