Re: [symfony-users] [Symfony2] [Doctrine2] Accessing container or any othet service right from Entity. Is it possible?

2011-03-30 Thread Alexander Kachkaev
Gustavo, thank you very much for your reply. Those extensions look very powerful! But to my mind the approach you’ve mentioned is more appropriate for applications having many languages rather than two or three. Translations are kept in separate tables, so there is more load on the database.

[symfony-users] [Symfony2] [Doctrine2] Accessing container or any othet service right from Entity. Is it possible?

2011-03-30 Thread Alexander Kachkaev
My question is already listed in the topic. I’d like to explain why I would like to have this feature with a simplified example. I am developing a multilingual website, and some entities are containing fields like: name_en name_fr name_xx The number of languages is not big, so there is no need

[symfony-users] [Symfony2] doctrine:schema:update problem when using custom types based on enum.

2011-03-27 Thread Alexander Kachkaev
Hi there! I have faced a strange error when trying to update my database using console. I am using a custom type in Doctrine ORM, but as the problem occurs only when launching *doctrine:schema:update*, so I decided to report a problem here. The output of the console is the following: *php app

[symfony-users] [Symfony2] [PR8] Catchable fatal error on login page when having “requires_channel: https” in access_control config

2011-03-24 Thread Alexander Kachkaev
Hi there! After updating symfony2 to PR8 I have noticed a strange issue. I would like to let user be logged in using https only, so in my “security” config section I have the following: ... access_control: - { path: /login, role: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

Re: [symfony-users] [Symfony2] Responding with a template at "core.exception"

2011-02-27 Thread Alexander Kachkaev
Thank you, Christophe. The idea is rather clear. Unfortunately, when I write framework: exception_controller: MyController\Controller\ExceptionController I get the InvalidArgumentException with message “The "framework" tag is not valid”. It seems that I should define this Controller somehow else

[symfony-users] [Symfony2] Responding with a template at "core.exception"

2011-02-25 Thread Alexander Kachkaev
Hi everyone! My question is regarding generating responces at "core.exception" event. I would like to make my own global custom exceptoin handler. I have implemented a listener which looks like this: class MyListener { public function notifyUntill(EventInterface $event) { $exception =

[symfony-users] Passing container parameter into twig extension without configuration files

2011-02-21 Thread Alexander Kachkaev
I have a question about dependency injection and making a twig extension. Now I have a simple Twig extension like the one in this tutorial: http://www.martinsikora.com/how-to-make-twig-extension-for-symfony2 This is what I want to do with it: public function __construct(ContainerInterface $conta

[symfony-users] Re: [Symfony2] Regular expressions in routing patterns or how to make a “default” route

2011-02-19 Thread Alexander Kachkaev
; > This should work, but in most cases I think what you actually want to > do is implement a 404 page. > > Cheers > > On Fri, Feb 18, 2011 at 7:57 PM, Alexander Kachkaev > > > > > > wrote: > > Hi, guys! > > > In my application I would like all unre

[symfony-users] [Symfony2] Regular expressions in routing patterns or how to make a “default” route

2011-02-18 Thread Alexander Kachkaev
Hi, guys! In my application I would like all unresolved URIs to be passed to the default action of some controller. In other words I want to substitute standard NotFoundHttpException with something else, always having an instance of the my controller and manipulating with it. This is what I have

[symfony-users] Dynamic subdomains in a Symfony2 project

2011-02-06 Thread Alexander Kachkaev
Hello, guys! I am planing to use dynamic subdomains for my app in order to let users have their own subdomains and also to manage versions for different platforms, e.g. example.com (www.example.com redirects here) user1.example.com user2.example.com m.example.com iphone.example.com m.user1.exam

[symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread Alexander Kachkaev
universal solution, and I hope that it will be added to the Symfony documentation. On Feb 1, 9:09 pm, Christophe COEVOET wrote: > Le 01/02/2011 20:04, Alexander Kachkaev a crit : > > > > > Hello, guys! > > > Does anyone know how to integrate a custom doctrine mapping type i

[symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread Alexander Kachkaev
I guess there might be some global handler for all the resources. Thus the link to entity manager object could be extracted in autoload.php and everything would be fine. But I am not sure about this hypothesis. :) On Feb 1, 9:09 pm, Christophe COEVOET wrote: > Le 01/02/2011 20:04, Alexan

[symfony-users] Doctrine 2 custom mapping type in Symfony 2

2011-02-01 Thread Alexander Kachkaev
Hello, guys! Does anyone know how to integrate a custom doctrine mapping type into a Symfony 2 project? There is a great documentation on how to do that simply using Doctrine (http://www.doctrine-project.org/docs/dbal/2.0/en/reference/ types.html#custom-mapping-types), but there is no information