swToolboxPlugin - 1.2.11

Add some extra tools to symfony.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

Information

The plugin have been splitted into many plugins :

swBreadcrumb

Please read Working with symfony plugins breadcrumb

swToolboxHelper

sw_t($title)

  • define the title of the current page
  • custom configuration : edit and add these lines to your app.yml

    swToolbox:
      page_title_enabled: true
      page_title_suffix: " - Thomas Rabaix"

sw_insert_google_api

  • small helper to insert google api url

    swToolbox:
      api_loader:
        yourhostname:
          google_api_key: your_key_here
          google_map_version: 2.x
          google_map_url: http://maps.google.com/maps
          google_analytics: [ UA-KEY-ONE, UA-KEY-TWO]

swUserContextCacheFilter

This class can replace the default cache handler class. The class always executes an user context action.

Let's take this example with an ecommerce website, you might want to cache the full action, however some parts are user specific. So you can have a viewProduct action and a viewProduct_UserContext action in your actions.class.php

  • viewProduct : execute page related action, get the product and other related information
  • viewProduct_UserContext : execute user specific action for the current page, like testing if the product is already in the client's basket.

Installation

  • edit the filters.yml

    cache:
      class: swUserContextCacheFilter
      param:
        condition: on # always set to on