我使用Zend框架,引导和ReverseForm适配器,与它一个有趣的问题:当我在Zend的形式使用引导日期选择器我有下一个异常:
Object provided to Escape helper, but flags do not allow recursion
还有就是我formfield的代码:
use \Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use \Zend\Form\Annotation as ZFA;
...
/**
* @var \DateTime
*
* @ODM\Date
*
* @ZFA\Type("ReverseForm\Element\BootstrapDatepicker")
* @ZFA\Attributes({"type":"text"})
* @ZFA\Options({
* "label":"Date",
* "extended": {
* "help": {"content": ""},
* }
* })
*
*/
private $date;
并有我的反向形式的配置:
'ReverseForm\Element\BootstrapDatepicker' => array(
'js' => array(
'/vendor/datepicker/js/bootstrap-datepicker.js'
),
'css' => array(
'/vendor/datepicker/css/datepicker.css'
),
'template' => 'input.phtml',
'inlineJs' => "$('#%1\$s').datepicker(%2\$s);",
'inlineJsConfig' => array(
'format' => 'dd.mm.yyyy',
'weekstart' => new \Zend\Json\Expr(1),
)
),
在那里我有一个错误?