Symfony2表单文件夹(Symfony2 Form folder)

我需要创建一个表单类,我正在关注http://symfony.com/doc/current/book/forms.html中的symfony书。

我正在尝试在src / Acme / TaskBundle / Form / Type / TaskType.php中创建一个表单,但是当我查看项目中的文件夹结构时,没有“Form”文件夹。

我尝试手动创建Form文件夹,在src / Acme / TaskBundle /中,我在表单文件夹和TaskType.php文件中遇到错误(名称空间Acme \ TaskBundle \ Form \ Type Expected:Identifier)。

有没有办法以自动方式创建窗体文件夹? 或者我如何手动创建?


I need to create a form class,I'm following the symfony book in http://symfony.com/doc/current/book/forms.html

I am trying to create a form in src/Acme/TaskBundle/Form/Type/TaskType.php, but when I look at the folder structure on my project there is no "Form" folder.

I try to create the Form folder manually, in src/Acme/TaskBundle/, I get an error in the the Form Folder and in the TaskType.php files ( namespace Acme\TaskBundle\Form\Type Expected:Identifier).

Is there a way to create the Form folder in an automatic way? Or how can I create in manually?


原文:https://stackoverflow.com/questions/12343621
2023-09-05 12:09

满意答案

在这里找到解决方案: 如何创建不同的pendingintent所以filterEquals()返回false?

使用PendingIntent.getBroadcast的第二个参数可以建立唯一的PendingIntent。 不需要一个独特的Action,尽管这是我能找到的其他帖子所建议的。

不确定现在如何关闭这个问题......


Found the solution here: How to create different pendingintent so filterEquals() return false?

Using the second parameter of PendingIntent.getBroadcast works to establish a unique PendingIntent. There is no need for a unique Action, though that is what every other post I could find suggested.

Not sure how to close the question now...

相关问答

更多

什么是Android PendingIntent?(What is an Android PendingIntent?)

PendingIntent是您向外部应用程序(例如NotificationManager , AlarmManager ,Home Screen AppWidgetManager或其他第三方应用程序)提供的令牌, 允许外部应用程序使用您的应用程序的权限来执行预定义的一段代码 。 如果你给外国应用程序一个意图,并且该应用程序发送/广播你给出的Intent ,他们将使用自己的权限执行Intent 。 但是,如果您使用您自己的权限为外部应用程序提供了您创建的PendingIntent ,则该应用程序将使...

何时PendingIntent被处置/删除?(When exactly does a PendingIntent get disposed/removed?)

因此,假设除非我明确取消PendingIntent,它仍然存储在内存中的某处,这是正确的 是。 Android缓存PendingIntent对象。 AFAIK,他们将一直闲逛,直到该过程终止。 So is it correct to assume that unless I explicitly cancels the PendingIntent it's still stored somewhere in the memory Yes. Android caches PendingIntent ...

通知上的回调PendingIntent(callback PendingIntent on a notification)

我建议在您的应用程序中使用BroadcastReceiver作为PendingIntent的Intent来打开URL,在该BroadcastReceiver您可以知道用户何时打开通知。 示例代码 - PendingIntent pendingIntent; Intent intent; NotificationManager notificationManager = (NotificationManager) getSystemService (Context.NOTIFICATION_SER...

PendingIntent不会调用已杀死进程的BroadcastReceiver(PendingIntent does not invoke BroadcastReceiver of killed process)

正如CommonsWare指出的那样,杀死这样的过程 为了杀死应用程序,我在HTC Desire的后退按钮上使用了longpress(2.3.7 CyanogenMod 7.2.0.1) 似乎是非常具有破坏性的,因为它也 - 在我的情况下 - 显然删除了与我的应用程序连接的警报,这是不打算的。 要模拟你的进程被杀死使用 DDMS =>高亮你的应用程序=>点击STOP As CommonsWare pointed out, killing processes like that For killin...

使用唯一的requestCode取消PendingIntent(Cancelling a PendingIntent with unique requestCode)

您正在尝试使用PendingIntent创建服务,并尝试取消广播。 它永远不会奏效。 您需要使用要尝试取消的PendingIntent来获取getService。 You are trying to create a service with your PendingIntent and are trying to cancel a Broadcast. It will never work. You need to getService with the PendingIntent you ar...

Android:空PendingIntent(Android : Null PendingIntent)

所以看起来我的问题与我试图传递给PendingIntent的参数的大小有关。 海事组织的日志记录/错误处理在这里可能会好一点,但基本上,因为我在我的通知中附加了一个大的位图作为BigPictureStyle,所以Parcelable最终变得太大,需要以不同的方式处理。 TL;博士 我避免将通知作为Parcelable传递,而是在我稍后收到我的广播时传递一个用于获取正确通知的ID。 感谢pskink帮助调试。 So looks like my issue had specifically to do...

通过PendingIntent调用的活动会自动销毁(Activity called via PendingIntent getting destroyed automatically)

尝试这个 清单中的 活动 <activity android:name=".LightUp" android:launchMode="singleTop" </activity> Java代码 Intent notificationintent = new Intent(context, LightUp.class); notificationintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SIN...

使用sharedPreferenceChange中的pendingIntent重新计划不准确的重复警报(Reschedule inexactRepeating alarm with pendingIntent from sharedPreferenceChange)

我发布这个问题已经有一段时间了,现在我觉得很愚蠢,因为答案很明显。 调用getActivity()并将其传递给上下文。 如果需要Activity中的上下文,可以在任何fragment调用getActivity() 。 请记住, 您传递的上下文类型很重要 ,如果您在某些情况下使用活动的上下文而不是应用程序上下文( getActivity().getApplicationContext() ),则可以获得不同的结果。 查看此链接以了解更多信息。 It's been a while since I po...

独特的PendingIntent with Manifest声明(Unique PendingIntent with Manifest declaration)

在这里找到解决方案: 如何创建不同的pendingintent所以filterEquals()返回false? 使用PendingIntent.getBroadcast的第二个参数可以建立唯一的PendingIntent。 不需要一个独特的Action,尽管这是我能找到的其他帖子所建议的。 不确定现在如何关闭这个问题...... Found the solution here: How to create different pendingintent so filterEquals() retu...

PendingIntent不适用于Android O.(PendingIntent is not working on Android O)

当显式Intent执行时, 永远不要使用隐式Intent 。 Android O通过禁止从清单注册的接收器接收隐式Intent广播来帮助强制执行此操作。 步骤#1:从<receiver>删除<intent-filter> (这也意味着你可以摆脱android:exported="false" ,因为它现在是默认值) 步骤#2:用new Intent(context, NotificationReceiver.class).putExtra("id", id)替换new Intent("CANCEL...

相关文章

更多

Symfony2网站开发

http://blog.csdn.net/liubei5/article/details/132902 ...

HTML5 智能form表单新属性

内容摘要:HTML5 智能form表单新属性,主要包括智能表单介绍和智能表单使用与规范。但在不同支持H ...

form load 的问题

baseinfoForm.form.load({ url: '/Url/Institution/In ...

关于一个页面多个form问题????????

当前我的页面是用一个&lt;c:forEach &gt;遍历出来的。有多个form每个都不一样,我可以 ...

form中如何接收传入的值

如题,怎么给form的一个hidden隐藏域中传个id进去 问题补充:不能存在那里面 ...

ext里window里放form的布局?

window里布局了一个form,window有个最大化按钮,点击最大化,form的布局就占windo ...

在java中如何获取文件夹占用空间的大小?(注意这里不是问文件夹大小)

一般情况下,文件夹大小和文件夹占用空间是不一样的,如附件所示。 在java中,如果要求文件夹大小,可 ...

如何把复选框中的值传到form里?

&lt;td&gt; &lt;input type=&quot;checkbox&quot; nam ...

删除暴风文件夹内的stormliv.exe

要删除暴风文件夹内的stormliv.exe 需要先在任务管理器中关闭stormliv.exe 要彻底 ...

ajax怎么提交带文件上传表单

&lt;form name=&quot;form1&quot; method=&quot;post&q ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本