Вопрос

I am trying to create a bundle in vendors in Symfony2.

MyBundle(MineUserBundle) needs to inherit other two bundle in vendors FOSUserBundle and HWIOAuthBundle.

How to get inherit both bundles properties, templates etc in Mybundle?

vendors
   FOSUserBundle 
   HWIOAuthBundle
   MineUserBundle

Here MineUserBundle needs to have all features of other two bundle.

How to get the process work?

Это было полезно?

Решение

Since you are using namespaces it does not mater into which folder you are going to deploy your Bundle. Just include use statements in your bundle with ones you need:

use Path\To\FOS\UserBundle;
use Path\ToHWIO\AuthBundle;

And you can extend whatever you need.

But if you really want to install your bundle to vendor directory, then you have to configure define it in your deps file.

[YourVendorYouBundle]
    git=git@github.com:yourRepository/YourVendorYouBundle.git
    target=/bundles/YourVendor/YouBundle
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top