2017-04-06 1 views

답변

0

당신은 번들 전화 해달라고 내 "주"응용 프로그램에서 내 번들 "호출"하는 방법에 대한 litteraly 붙어 있지만 등록해야 AppKernel.php 파일의 번들 :

class AppKernel extends Kernel 
{ 
    public function registerBundles() 
    { 
     $bundles = [ 

      // ... 

      new AppBundle\AppBundle(), 
      new Company\CustomBundle\CompanyCustomBundle(), 
     ]; 
    } 

    // ... 
} 

경로를 가져와야 할 수도 있지만 라우트 또는 yaml 파일에 주석을 사용하면 잘 모릅니다.

자세히보기 :

http://symfony.com/doc/current/bundles.html http://symfony.com/doc/current/bundles/best_practices.html

[편집]

이 항목 제목을 읽는 당신이 혼란 번들과 서비스 있음을 것 같습니다. 번들에 서비스를 추가하려면 AppBundle에이 서비스를 추가하는 것과 같은 방법으로 서비스를 추가하십시오. http://symfony.com/doc/current/service_container.html#creating-configuring-services-in-the-container