Посты по тегу "filter":

Pixel Чтобы добавлять в избранное, нужно авторизироваться

php / Динамическое изменение layout в symfony 1.2

class changeLayoutFilter extends sfFilter
{
  public function execute($filterChain)
  {
    // Execute this filter only once
    if ($this->isFirstCall())
    {
      // Filters don't have direct access to the request and user objects.
      // You will need to use the context object to get them
      $request = $this->getContext()->getRequest();
      $user    = $this->getContext()->getUser();
      //устанавливаю layuot
      if(isNY()){
        sfConfig::set('symfony.view.'.
            $this->getContext()->getModuleName().'_'.
            $this->getContext()->getActionName().'_layout',
          'your_layout');
      }
    }
    // Execute next filter
    $filterChain->execute();
  }
}
2009-03-18 17:05:46
Pixel Чтобы добавлять в избранное, нужно авторизироваться

На правах рекламы

картридж hp p1005

Product x Daytona Replica Swiss e: $uct SKU: a question about this tity: Quantity.

Search Tags Help brity posters http://idposter.com/ Explore more tags block notes note notes.

Icon-rating-openIcon-rating-openIcon-rating-openIcon-rating-openIcon-rating-open
2012-02-07 03:05:23