Sonata AdminBundle y UserBundle: ¿cómo puedo encontrar este parámetro?

After "finish" studying Symfony2, I start to take a look to Sonata Admin and User bundles since, those bundles, could help me in some future works.

On the firsts, all seems to me terribly complicated and difficult to understd. But with few hours of architecture study, applied to real files,classes and so on, I suppose that I've understood perfectly what's the essence of that bundle and how this works.

My only "black hole" into whole thing understand is, where can I find the parameter used into sonata.user.admin.user, lo cual se conoce como sonata.user.admin.user.entity? As far I know, that parameter simply point to user class that is responsable for read/write operation from and to database.

I ask this because, after dozens of minutes spent looking, the only place where I found those information are

./app/cache/prod/appProdProjectContainer.php
./app/cache/dev/appDevDebugProjectContainer.xml
./app/cache/dev/appDevDebugProjectContainer.php

Is possible that this variable is defined only there?
If yes, because is placed into cache folder? Is loading time faster?

preguntado el 28 de agosto de 12 a las 13:08

1 Respuestas

You should also look through Extensions in DependencyInjection folders - sometimes arguments are defined in yaml in one way, but after loading with concatenation they are transformed into another:

Si en tu parameters tienes algo como:

your_user: 'Somename'

Y en DependencyInjection it is parsed as follows:

foreach($config as $key => $value) {
    $container->setParameter('your.prepend.'.$key, $value);
}

Then in the end you'll have your parameter compiled with index your.prepend.your_user.

I guess, the same logic is used in mentioned bundles.


ACTUALIZACIÓN:

Ejemplo of usage of described logic

Respondido 28 ago 12, 14:08

Yes i know that parameters are "paresed" and concatenated with this dot notation, in fact it sounds too strange to me that a parameter definition is write into a file contained into cache folder.. But I can't find it elsewhere .. I'll take a better look later and tell you if I'll find. For now, thank you and +1 for explaination. - DonCalisto

@DonCallisto try to grep with parts of string - f.e. look for sonata.user and something like this. And it is logically that is cache compiled parameter is present :) - vitalii zurian

I've alredy tried with part of strings, but maybe not the "right" parts :) And yes, I know that is logical but i mean "isn't logical that is DEFINED ONLY there" :) - DonCalisto

@DonCallisto Probably este puede ser lo que buscas - vitalii zurian

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.