Knp\Menu\Factory\ExtensionInterface
Knp\Menu\Silex\RouterAwareFactory
is deprecated in favor of Knp\Menu\Silex\RoutingExtension
.createFromArray
and createFromNode
in the MenuFactory and
removed them from Knp\Menu\FactoryInterface
. Use Knp\Menu\Loader\ArrayLoader
and
Knp\Menu\Loader\NodeLoader
instead.moveToPosition
, moveToFirstPosition
, moveToLastPosition
,
moveChildToPosition
, callRecursively
, toArray
, getPathAsString
and getBreadcrumbsArray
in the MenuItem and removed them from Knp\Menu\ItemInterface
. Use Knp\Menu\Util\MenuManipulator
instead.[BC break compared to 2.0 alpha 1] Refactored the RouterVoter to make it more flexible The way to pass routes in the item extras has changed.
Before:
'extras' => array(
'routes' => array('foo', 'bar'),
'routeParameters' => array('foo' => array('id' => 4)),
)
After:
'extras' => array(
'routes' => array(
array('route' => 'foo', 'parameters' => array('id' => 4)),
'bar',
)
)
The old syntax is kept until the final release, but using it will trigger a E_USER_DEPRECATED error.
buildOptions
and configureItem
in the MenuFactory as extension point by inheritancesetCurrentUri
, getCurrentUri
and getCurrentItem
have been removed from the ItemInterface.
Determining the current items is now delegated to a matcher, and the default implementation
uses voters to apply the matching. Getting the current items can be done thanks to the CurrentItemFilterIterator.label
, uri
and item
.Knp\Menu\ItemInterface::getCurrentItem
as deprecatedknp_menu_get()
in Twig templatesfromArray
(the key is used instead)