草庐IT

sonata-project

全部标签

php - Sonata 批量操作和 Hooks 原则

我用Sonata(Symfony2Bundlehttp://sonata-project.org/about)创建了一个管理面板,并且在preRemoveHook(Doctrine)中添加了一个事件。简而言之,当我删除记录时,运行curl到其他服务。一切正常。但是Sonata也有“批处理操作”,我可以在其中选择多行并选择“删除所有选定的”。但是,如果我选择“删除所有选定的”,curl不会启动。preRemove钩子(Hook)(Doctrine)它没有被调用。有人可以帮助我吗?!谢谢 最佳答案 看来,批量删除操作确实避免了调用pre

php - sonata admin + a2lix + gedmo 可翻译问题

我正在尝试使用sonataadmin+a2lix+gedmotranslatable来翻译我的实体。不幸的是它不起作用,因为我希望在表单中看到我的可翻译字段,而在我的后端我可以看到这个“字段-内容”:我已经学习了这个教程:http://a2lix.fr/bundles/translation-form/http://www.elao.com/blog/symfony-2/doctrine-2/how-to-manage-translations-for-your-object-using-sonataadminbundle.html和包的文档。在这里你可以找到我写的所有代码:https

php - 奏鸣曲管理员 - sonata_type_collection : select from the list of existing entities

我正在尝试使用PageHasImage桥接实体在Page和Image实体之间实现多对多关系。在PageAdmin中,我添加了如下字段:->add('galleryImages','sonata_type_collection',array('cascade_validation'=>false,'by_reference'=>false,'type_options'=>array('delete'=>false)),array('edit'=>'inline','inline'=>'table','sortable'=>'position','admin_code'=>'sonata.

php - Laravel - php artisan 制作 :model Project Doesnt Work

我需要使用这个命令来创建一个模型。当我这样做时:phpartisanmake:modelProject我收到了[InvalidArgumentException]Therearenocommandsdefinedinthe"make"namespace.因此,在我正在学习的教程中,这个人使用它来制作模型。我该怎么办?所以,我发现我正在使用laravel4,并且这个命令确实存在。如何在没有此make命令的情况下构建模型? 最佳答案 make:model命令是Laravel5的新命令,因此在4中将不可用。要制作模型,您只需使用以下代码在

php - 禁用 SonataUserBundle sonata.user.admin.group 服务

我正在使用SonataAdminBundle和SonataUserBundle。SonataUserBundle注册了一个服务sonata.user.admin.group,SonataAdminBundle会自动检测该服务,以在管理仪表板中设置链接以对CRUD操作进行分组。如何禁用sonata.user.admin.group?我一直在遵循Symfony2文档中的食谱:HowtoOverrideanyPartofaBundle-ServicesandConfigurationCompilingtheContainer-CreatingaCompilerPassWorkingwithC

php - Sonata Media Bundle - 如何编写自定义图像缩放器

我正在使用SonataMediaBundle我需要为图像缩放器编写特定行为的代码,因为默认的SimpleResizer和SquareResizer类不符合我的需要。我想要一个简单的图像缩放器,如果我指定了width和height参数,它可以让我准确地调整图像的大小。如果我不指定height参数,我还希望它可以回退到simpleresizer行为。我刚刚搜索了文档,但找不到解决方案。 最佳答案 首先,您必须在您的包中创建一个调整器服务,以便将其放入SonataMediaBundle配置中。#Acme/Bundle/CoreBundle

php - “The block type sonata.Admin.block.admin_list does not exist”

我是Symfony2的新手,在生成我的管理面板时遇到了这个问题。Anexceptionhasbeenoccurredduringtherenderingofatemplate("Theblocktypesonata.Admin.block.admin_listdoesnotexist")inSonataAdminBundle:Core:dashboard.html.twigatline35我正在关注此文档SonataAdminBundle. 最佳答案 你必须在app/config/config.yml中指定所有block,就像在th

php - 拉维 PHP : multiple project run at the same time

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭8个月前。Improvethisquestion我想同时运行多个laravelframework项目。具体怎么做我不知道。我使用命令:phpartisanserv--port=8080,在端口8080上运行另一个项目。当我在cmd中使用此命令时,它显示错误:

php - 如何在 symfony2 中覆盖 sonata admin bundle 的 css

我想覆盖一个css文件,即驻留在sonata-project/admin-bundle/Sonata/AdminBundle/Resources/public/bootstrap/csssonataadminbundle项目的路径中。请帮帮我。 最佳答案 一种方法可以覆盖sonataadmin的css文件,但请记住这将覆盖stylesheetsblock,但您仍然可以通过调用调用父block的stylesheets{{parent()}}{%blockstylesheets%}/*thiswilloverridetheparentb

php - Symfony.4 Sonata AdminBundle 注销错误 : You must activate the logout in your security firewall configuration

登录正常。在/admin/logout出现错误Youmustactivatethelogoutinyoursecurityfirewallconfiguration.在在*\vendor\sonata-project\user-bundle\Controller\AdminSecurityController.php第98行我按照记录将注销设置为true:安全.yml:firewalls:main:pattern:.*#pattern:^/form-login:provider:fos_userbundlecsrf_provider:form.csrf_providerlogin_pa