2017-10-17 3 views
0

괴괴 망측 한 일을 찾을 수 없음, 단지컨트롤러 클래스 내 심포니 2 프로젝트에

SRC/AppBundle/컨트롤러 ... 설치 라우팅, 나는 보통 때와 같이하고 그냥 작동하지 않습니다 어떤 이유로 새로운 컨트롤러를 추가 /SupplierController.php :

namespace AppBundle\Controller; 
// omitted all necessary use statements, but they are normally here... 

class SupplierController extends Controller 
{ 
    public function signUpAction(Request $request) 
    { 
     $defaultData = array('message' => 'Type your message here'); 
     $form = $this->createFormBuilder($defaultData) 
      ->add('fname', TextType::class, array('label' => 'First Name')) 
      ->add('lname', TextType::class, array('label' => 'Last Name')) 
      ->add('company', TextType::class) 
      ->add('email', EmailType::class) 
      ->add('phone', NumberType::class, array('label' => 'Tel. No.')) 
      ->add('message', TextareaType::class) 
      ->add('receiveUpdates', CheckboxType::class) 
      ->add('send', SubmitType::class) 
      ->getForm(); 

     $form->handleRequest($request); 

     if ($form->isSubmitted() && $form->isValid()) { 
      // data is an array with "name", "email", and "message" keys 
      $data = $form->getData(); 
     } 

     return $this->render('AppBundle:Suppliers:SignUp:_form.html.twig', array('form' => $form->createView())); 
    } 

} 

응용 프로그램/설정/routing.yml :

:

// other routes omitted... 

supplier_sign_up: 
    path: /supplier/register 
    methods: [GET] 
    defaults: 
     _controller: AppBundle:Supplier:signUp 

페이지를 실행 0

The _controller value "AppBundle:Supplier:signUp" maps to a 
"AppBundle\Controller\SupplierController" class, but this class was not 
found. Create this class or check the spelling of the class and its 
namespace. 

매우 이상한 ey? 경로는 컨트롤러를 인식하고 네임 스페이스는 정확하며 맞춤법 검사 등을 수행 할 수 없습니다. 어떤 도움이라도 대단히 감사하겠습니다. 건배

+0

그것은 권한 문제가 될 수있는 sylius 자원으로 내 양식을 구성하고 서비스를 통해 호출했다 심포니와 함께 작동하는 방식에하는 Sylius 문제로 밝혀졌다 어둠 속에서 그냥 쐈어. – ArtisticPhoenix

+0

'class SupplierController extends Controller' 행의 공백을 제거/읽으려고합니다. 나는 두개의 IDE에 "이상한"공간 옆에있는 단어의 이름을 엉망으로 만든 정상적인 공간 대신에 이상한 공간을 추가했습니다. – JimL

+0

다른 컨트롤러가 정상적으로 작동하므로 권한 문제가 아닙니다. 모든 컨트롤러에 대한 사용 권한을 확인했으며 모두 동일합니다. 불행히도 주사위를 던지려고 시도하지 않았습니다. –

답변

0

그래서 이것은 기본적으로 인해 Sylius 내가