V
V
Vadim2016-02-25 19:12:32
symfony
Vadim, 2016-02-25 19:12:32

Where to store custom functions in Symfony 2?

Hello! I am new to Symfony 2. I am creating a website, I wrote a couple of functions to display "breadcrumbs". Where are these functions stored? I wrote them in MainController, but judging by the documentation, this is not the right solution. I think to create a separate class for them. But in what directory to store it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergeyj, 2016-02-25
@Shtaket87

https://symfony.com/doc/master/book/service_contai...
You need to use services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question