这是我的控制器:
/**
* Finds and displays a Formacion entity.
*
* @Route("/{id}/show", name="curso_show")
* @Template()
*/
public function showAction($id)
{
$em = $this->getDoctrine()->getEntityManager();
$curso = $em->getRepository('GitekUdaBundle:Curso')->find($id);
if (!$curso) {
throw $this->createNotFoundException('Unable to find Curso entity.');
}
$deleteForm = $this->createDeleteForm($id);
// Detalle Formación
$detcurso = new Detcurso();
$formdetcurso = $this->createForm(new DetcursoType(), $detcurso);
return array(
'curso' => $curso,
'delete_form' => $deleteForm->createView(),
'detcurso' => $detcurso,
'formdetcurso' => $formdetcurso,
);
}
Run Code Online (Sandbox Code Playgroud)
在我的开发环境中工作正常(Mac),但当我去我的生产环境(CentOS服务器)我得到
The controller must return a response (Array(curso => Object(Gitek\UdaBundle\Entity\Curso), delete_form => Object(Symfony\Component\Form\FormView), …
Run Code Online (Sandbox Code Playgroud) 我使用VichUploaderBundle上传我的媒体文件,我想使用AvalancheImagineBundle在我的模板中创建拇指.怎么做?
我现在有这个:
<td><img src="{{ vich_uploader_asset(entity, 'image') | apply_filter('my_thumb')}}" alt="{{ entity.nombre }}" /></td>
Run Code Online (Sandbox Code Playgroud)
但输出是:
<img src="/app_dev.php/media/cache/my_thumb/images/uploads/392158_10150441208223772_580903771_8591661_774015725_n.jpg" alt="Froga"/>
Run Code Online (Sandbox Code Playgroud)
这是我的config.yml:
# Vich Uploader
vich_uploader:
db_driver: orm
twig: true
gaufrette: false # set to true to enable gaufrette support
storage: vich_uploader.storage.file_system
mappings:
uploads:
uri_prefix: /images/uploads
upload_destination: %kernel.root_dir%/../web/images/uploads
namer: ~ # specify a file namer service id for this entity, null default
directory_namer: ~ # specify a directory namer service id for this entity, null default
delete_on_remove: true # determines whether to delete file upon …
Run Code Online (Sandbox Code Playgroud) 我正在使用Symfony2,我需要执行此SQL,例如:
Run Code Online (Sandbox Code Playgroud)select detformacion.* from detformacion left join formacion on detformacion.formacion_id = formacion.id left join detcurso on formacion.id = detcurso.formacion_id where detcurso.id IN ('143','144');
为此,我在我的存储库中有这个:
public function getSeleccion(){
$em = $this->getEntityManager();
$query = $em->createQueryBuilder()
->select('d')
->from('GitekUdaBundle:Detformacion', 'd')
->leftJoin('d.formacion', 'f')
->leftJoin('f.detcursos', 'det')
->where('det.id = :miarray')
->setParameter('miarray',array('143','144'))
->getQuery()
;
return $query->getResult();
}
Run Code Online (Sandbox Code Playgroud)
我尝试过 - > where('det.id IN:miarray')但我一直都会遇到错误.
任何帮助或线索?
提前致谢.
更新:问题是设置参数.
我在我的页面上有这个jQuery代码在Chrome中运行良好,但是我在触发器('click')行中获得了Internet Explorer 8的错误
$('#btnd16').click(function(e){
var iiid = $('#midet').val();
$('#d16_midethistorial_id').val(iiid);
//sumamos por ajax
var $mivalor = $('#d16_midethistorial_id').val()
var $url = $('input#miruta').val();
$.post($url, { midethistorial_id: $mivalor },
function(data) {
$("#nirefancy").fancybox({
'width' : '90%',
'height' : '90%',
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'type' :'inline',
'autoDimensions': false,
'autoScale' : false,
'scrolling' : 'no',
'titleShow' : true,
}).trigger('click');
});
return false
});
Run Code Online (Sandbox Code Playgroud)
这是我的fancybox的html:
<a href="{{ path('detformacion_play',{'id': detentrenamiento.detformacion.id }) }}" id="nirefancy" style="display: none;">.</a>
Run Code Online (Sandbox Code Playgroud)
我点击了一个butten,然后在数据库中通过ajax插入一些数据,之后我想打开一个fancybox.就像我说的,它适用于Chrome,但不适用于IE8
任何帮助或线索?提前致谢
我们开发了一个纵向模式的应用程序,没有支持acelerometer.
出于可用性,我们需要转180ºdeapp,因此我们需要在颠倒模式下使用该应用程序.我们检查xib属性,如果我们找到了一些神奇的东西来实现......没办法
任何,线索?任何帮助?
谢谢你
symfony ×3
doctrine-orm ×1
dql ×1
fancybox ×1
ios ×1
iphone ×1
javascript ×1
jquery ×1
sql ×1
symfony-2.1 ×1
xcode ×1
xcode4 ×1