I
I
Ivan Volkov2016-02-09 22:03:43
symfony
Ivan Volkov, 2016-02-09 22:03:43

Symfony2 - How to create your bundle correctly?

Good day!
Started studying Symphony. I did the task, everything works, but they asked me to issue this task as a separate bundle.
Actually the question is - how to do it right in Symphony Way?
I do:
php app/console generate:bundle
but no matter what format I choose, it makes me some kind of default bundle (as I understand it from the folder "/vendor/sensio/generator-bundle/Resources/skeleton/")...
How can I configure this skeleton so that it dragged me in there only what I need, what I will prescribe? from the folders /src/AppBundle/* , from /app/Resources/views/* , something from /web/ , I added something to AppKernel.php -> $bundles, etc.
Well, or in which direction to look in order to be imbued with this concept of creating a separate bundle, so that others could install it and nothing broke there and my module also fully functioned?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2016-02-09
@oOLokiOo

first you generate a new default bundle.
then you add whatever you need.
the script will generate a standard structure and write the bundle to AppKernel and routes.yml - the whole
idea is that you create a bundle and start working in it, there are no tools for auto moving from bundle to bundle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question