[FrameworkBundle] restricted to only URIs the first argument of the actions helper
This commit is contained in:
parent
b7e4cffae0
commit
3341c8ec43
|
@ -364,6 +364,22 @@
|
||||||
|
|
||||||
### FrameworkBundle
|
### FrameworkBundle
|
||||||
|
|
||||||
|
* The `render` method of the `actions` templating helper signature and arguments changed:
|
||||||
|
|
||||||
|
Before:
|
||||||
|
|
||||||
|
```
|
||||||
|
<?php echo $view['actions']->render('BlogBundle:Post:list', array('limit' => 2), array('alt' => 'BlogBundle:Post:error')) ?>
|
||||||
|
```
|
||||||
|
|
||||||
|
After:
|
||||||
|
|
||||||
|
```
|
||||||
|
<?php echo $view['actions']->render($view['router']->generate('post_list', array('limit' => 2)), array('alt' => 'BlogBundle:Post:error')) ?>
|
||||||
|
```
|
||||||
|
|
||||||
|
where `post_list` is the route name for the `BlogBundle:Post:list` controller.
|
||||||
|
|
||||||
#### Configuration
|
#### Configuration
|
||||||
|
|
||||||
* The 2.2 version introduces a new parameter `trusted_proxies` that replaces
|
* The 2.2 version introduces a new parameter `trusted_proxies` that replaces
|
||||||
|
|
|
@ -8,6 +8,7 @@ CHANGELOG
|
||||||
* `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method signature changed and the first argument
|
* `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method signature changed and the first argument
|
||||||
must now be a URI (the `generateInternalUri()` method was removed)
|
must now be a URI (the `generateInternalUri()` method was removed)
|
||||||
* The internal routes have been removed (`Resources/config/routing/internal.xml`)
|
* The internal routes have been removed (`Resources/config/routing/internal.xml`)
|
||||||
|
* The `render` method of the `actions` templating helper signature and arguments changed:
|
||||||
* replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver
|
* replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver
|
||||||
* replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher
|
* replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher
|
||||||
* added Client::enableProfiler()
|
* added Client::enableProfiler()
|
||||||
|
|
|
@ -34,21 +34,18 @@ class ActionsHelper extends Helper
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Response content for a given controller or URI.
|
* Returns the Response content for a given URI.
|
||||||
*
|
*
|
||||||
* @param string $controller A controller name to execute (a string like BlogBundle:Post:index), or a relative URI
|
* @param string $uri A URI
|
||||||
* @param array $attributes An array of request attributes
|
|
||||||
* @param array $options An array of options
|
* @param array $options An array of options
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @see Symfony\Bundle\FrameworkBundle\HttpKernel::render()
|
* @see Symfony\Bundle\FrameworkBundle\HttpKernel::render()
|
||||||
*/
|
*/
|
||||||
public function render($controller, array $attributes = array(), array $options = array())
|
public function render($uri, array $options = array())
|
||||||
{
|
{
|
||||||
$options['attributes'] = $attributes;
|
return $this->kernel->render($uri, $options);
|
||||||
|
|
||||||
return $this->kernel->render($controller, $options);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in New Issue