0
我使用ZF2.3.3如下面的截图时,有一个问题显示:ZF2自定义函数isActive()在Zend公司的导航页面的mvc
我的解决方案是定制isActive
功能Zend\Navigation\Page\Mvc
,但当我无法修改ZF内核时如何覆盖它?
我使用ZF2.3.3如下面的截图时,有一个问题显示:ZF2自定义函数isActive()在Zend公司的导航页面的mvc
我的解决方案是定制isActive
功能Zend\Navigation\Page\Mvc
,但当我无法修改ZF内核时如何覆盖它?
您应该检出the comment of Zend\Navigation\Page\AbstractPage::factory()
,您可以提供完全合格的类名作为type
选项。
* Factory for Zend\Navigation\Page classes * * A specific type to construct can be specified by specifying the key * 'type' in $options. If type is 'uri' or 'mvc', the type will be resolved * to Zend\Navigation\Page\Uri or Zend\Navigation\Page\Mvc. Any other value * for 'type' will be considered the full name of the class to construct. * A valid custom page class must extend Zend\Navigation\Page\AbstractPage.
注意到:
有效的自定义页面类必须扩展的Zend \导航\页\自AbstractBase
它看起来好像你还可以添加您但是我认为你不需要。