1
votes

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, called 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?

1

1 Answers

1
votes

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:

If in your parameters you have something like:

your_user: 'Somename'

And in 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.


UPDATE:

Example of usage of described logic