For symfony 1.3, ...

Add abitity to use custom myPHPView class

Add abitity to use custom myPHPView class (definied in factories.yml, for example), witch extends sfPHPView. Or at lest add ability to decorate not only templates, but partials too.

86 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    gen shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • videlalvaro commented  ·   ·  Flag as inappropriate

        I think what you ask is provided by symfony. In the post I explain only the part for the templates just to give an example. But the same stuff you extend on the sfPHPView on your lib folder can be achieved in this way. Instead of modifying the methods on the copied class sfPHPView, you can extend them on a custom View class. If you read the post you will see how to load it form the yaml files.

      • gen commented  ·   ·  Flag as inappropriate

        In your examples it's possible to extend view class, which render templates only, but how can I get extra functionality for partials? For example, in my project I added ability to decorate partials - I copied sfPHPView to lib folder, modified it and added custom rules for autoloading. But it's not a true way. I'd like to rename default sfPHPView class to myPHPView in factories.yml

      Feedback and Knowledge Base