我有一个表单,并且需要bindrequest中的字段类型,方法getType不能正常工作:
$peticion = $this->getRequest();
if ($peticion->getMethod() == 'POST')
{
$form->bindRequest($peticion);
if ($form->isValid()) {
foreach($form as $key => $per)
$per->getType(); // i want the type of item [text,checkbox,etc] the method getType() dont work
}}
Run Code Online (Sandbox Code Playgroud) 如何在本机sql上的symfony2 doctrine2中插入数据?
我的查询
insert into propriedades (id,name,descripcion,num_lote,cod_imovel,imovel,convenio,proprietar,cpf,area_ha,perimetro,location,centro) VALUES (nextval('propriedades_id_seq'),'?','?','?','?','?','?','?','?','?','?',ST_GeomFromKML('<Polygon><outerBoundaryIs><LinearRing><coordinates>".$terra['coordinates']."</coordinates></LinearRing></outerBoundaryIs></Polygon>'),ST_Centroid(ST_GeomFromKML('<Polygon><outerBoundaryIs><LinearRing><coordinates>".$terra['coordinates']."</coordinates></LinearRing></outerBoundaryIs></Polygon>')))
Run Code Online (Sandbox Code Playgroud) 我有一个带有iframe的页面,在这个iframe的内容中,所有窗口都有重定向,我该怎么做?
尝试:
window.location.href = 'logged.html';
如果页面是在框架中打开还是向上打开,我可以得到?
if(isiframe) window.top.location.href
Run Code Online (Sandbox Code Playgroud)
---解决方案---
if($("#cboxOverlay", top.document).length > 0)
if($("#cboxOverlay", top.document).css("display") != 'none')
window.top.location.href = '{{ path('portada') }}';
Run Code Online (Sandbox Code Playgroud) symfony ×2
doctrine ×1
doctrine-orm ×1
javascript ×1
persistence ×1
redirect ×1
symfony-2.1 ×1