Results 1 to 4 of 4

Thread: Symfony questions

  1. #1
    Join Date
    Aug 2009
    Posts
    54

    Symfony questions

    I have some questions regarding Symfony and so I think it is better to make a topic for it.

    Questions: Does the use of helpers include_stylesheet and include_javascript recommend against putting them view.yml?

    Is there any way to use a star or a regex for inclusion? (for such syntax, there's a twenty of CSS to included and so it is a big hack-tick)

  2. #2
    Join Date
    Nov 2008
    Posts
    1,022

    Re: Symfony questions

    Quote Originally Posted by KACY5 View Post
    Questions: Does the use of helpers include_stylesheet and include_javascript recommend against putting them view.yml?
    According to me, it should be in the templates, since it makes fewer files to manage different (and it does not break the separation of duties).

    Quote Originally Posted by KACY5 View Post
    Is there any way to use a star or a regex for inclusion? (for such syntax, there's a twenty of CSS to included and so it is a big hack-tick)
    No

    Then you can factorise it into a class or a helper. Or use sfFinder or glob at the limit, but very clean spa.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Symfony questions

    Symfony is a web application framework written in PHP which follows the model-view-controller (MVC) paradigm. It provides an architecture, components and tools for developers to build complex web applications faster.It does not reinvent the things but simply uses most of the best practices of web development and integrates some great third-party libraries.

  4. #4
    Join Date
    Nov 2008
    Posts
    996

    Re: Symfony questions

    In symfony, a view consists of two distinct parts:
    • The HTML presentation of the action result
    • All the rest, including the following:
      • Meta declarations: Keywords, description, or cache duration.
      • Page title: Not only does it help users with several browser windows open to find yours, but it is also very important for search sites' indexing.
      • File inclusions: JavaScript and style sheet files.
      • Layout: Some actions require a custom layout or no layout at all.


    In the view, all that is not HTML is called view configuration, and symfony provides two ways to manipulate it. The usual way is through the view.yml configuration file. It can be used whenever the values don't depend on the context or on database queries. When you need to set dynamic values, the alternative method is to set the view configuration via the sfResponse object attributes directly in the action.

Similar Threads

  1. Few questions regarding GPU.
    By Luna^Ivery in forum Monitor & Video Cards
    Replies: 5
    Last Post: 17-10-2011, 08:52 AM
  2. Few questions about SLI
    By Vishva in forum Monitor & Video Cards
    Replies: 9
    Last Post: 15-10-2011, 07:20 PM
  3. How to install PHP5 Framework Symfony
    By Danel in forum Software Development
    Replies: 4
    Last Post: 01-12-2010, 01:26 AM
  4. CPU and RAM questions.
    By saffu khan in forum Operating Systems
    Replies: 1
    Last Post: 22-04-2010, 01:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,566,999.43452 seconds with 17 queries