首页 \ 问答 \ Symfony2表单文件夹(Symfony2 Form folder)

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...

相关问答

更多
  • PendingIntent是您向外部应用程序(例如NotificationManager , AlarmManager ,Home Screen AppWidgetManager或其他第三方应用程序)提供的令牌, 允许外部应用程序使用您的应用程序的权限来执行预定义的一段代码 。 如果你给外国应用程序一个意图,并且该应用程序发送/广播你给出的Intent ,他们将使用自己的权限执行Intent 。 但是,如果您使用您自己的权限为外部应用程序提供了您创建的PendingIntent ,则该应用程序将使用您的应用 ...
  • 因此,假设除非我明确取消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 objec ...
  • 我建议在您的应用程序中使用BroadcastReceiver作为PendingIntent的Intent来打开URL,在该BroadcastReceiver您可以知道用户何时打开通知。 示例代码 - PendingIntent pendingIntent; Intent intent; NotificationManager notificationManager = (NotificationManager) getSystemService (Context.NOTIFICATION_SERVICE) ...
  • 正如CommonsWare指出的那样,杀死这样的过程 为了杀死应用程序,我在HTC Desire的后退按钮上使用了longpress(2.3.7 CyanogenMod 7.2.0.1) 似乎是非常具有破坏性的,因为它也 - 在我的情况下 - 显然删除了与我的应用程序连接的警报,这是不打算的。 要模拟你的进程被杀死使用 DDMS =>高亮你的应用程序=>点击STOP As CommonsWare pointed out, killing processes like that For killing the ...
  • 您正在尝试使用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 are try ...
  • 所以看起来我的问题与我试图传递给PendingIntent的参数的大小有关。 海事组织的日志记录/错误处理在这里可能会好一点,但基本上,因为我在我的通知中附加了一个大的位图作为BigPictureStyle,所以Parcelable最终变得太大,需要以不同的方式处理。 TL;博士 我避免将通知作为Parcelable传递,而是在我稍后收到我的广播时传递一个用于获取正确通知的ID。 感谢pskink帮助调试。 So looks like my issue had specifically to do with ...
  • 尝试这个 清单中的 活动 Java代码 Intent notificationintent = new Intent(context, LightUp.class); notificationintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_T ...
  • 我发布这个问题已经有一段时间了,现在我觉得很愚蠢,因为答案很明显。 调用getActivity()并将其传递给上下文。 如果需要Activity中的上下文,可以在任何fragment调用getActivity() 。 请记住, 您传递的上下文类型很重要 ,如果您在某些情况下使用活动的上下文而不是应用程序上下文( getActivity().getApplicationContext() ),则可以获得不同的结果。 查看此链接以了解更多信息。 It's been a while since I posted ...
  • 在这里找到解决方案: 如何创建不同的pendingintent所以filterEquals()返回false? 使用PendingIntent.getBroadcast的第二个参数可以建立唯一的PendingIntent。 不需要一个独特的Action,尽管这是我能找到的其他帖子所建议的。 不确定现在如何关闭这个问题...... Found the solution here: How to create different pendingintent so filterEquals() return fa ...
  • 当显式Intent执行时, 永远不要使用隐式Intent 。 Android O通过禁止从清单注册的接收器接收隐式Intent广播来帮助强制执行此操作。 步骤#1:从删除 (这也意味着你可以摆脱android:exported="false" ,因为它现在是默认值) 步骤#2:用new Intent(context, NotificationReceiver.class).putExtra("id", id)替换new Intent("CANCEL_DOWN ...

相关文章

更多

最新问答

更多
  • 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
  • Java中的不可变类(Immutable class in Java)
  • 寻求多次出现的表达式(Seeking for more than one occurrence of an expression)
  • linux只知道文件名,不知道在哪个目录,怎么找到文件所在目录
  • Actionscript:检查字符串是否包含域或子域(Actionscript: check if string contains domain or subdomain)
  • 懒惰地初始化AutoMapper(Lazily initializing AutoMapper)
  • 使用hasclass为多个div与一个按钮问题(using hasclass for multiple divs with one button Problems)
  • Windows Phone 7:检查资源是否存在(Windows Phone 7: Check If Resource Exists)
  • EXCEL VBA 基础教程下载
  • RoR - 邮件中的动态主体(部分)(RoR - Dynamic body (part) in mailer)
  • 无法在Google Script中返回2D数组?(Can not return 2D Array in Google Script?)
  • JAVA环境变量的设置和对path , classpth ,java_home设置作用和目的?
  • mysql 关于分组查询、时间条件查询
  • 如何使用PowerShell匹配运算符(How to use the PowerShell match operator)
  • Effective C ++,第三版:重载const函数(Effective C++, Third edition: Overloading const function)
  • 如何用DELPHI动态建立MYSQL的数据库和表? 请示出源代码。谢谢!
  • 带有简单redis应用程序的Node.js抛出“未处理的错误”(Node.js with simple redis application throwing 'unhandled error')
  • 使用前端框架带来哪些好处,相对于使用jquery
  • Ruby将字符串($ 100.99)转换为float或BigDecimal(Ruby convert string ($100.99) to float or BigDecimal)
  • 高考完可以去做些什么?注意什么?
  • 如何声明放在main之后的类模板?(How do I declare a class template that is placed after the main?)
  • 如何使用XSLT基于兄弟姐妹对元素进行分组(How to group elements based on their siblings using XSLT)
  • 在wordpress中的所有页面的标志(Logo in all pages in wordpress)
  • R:使用rollapply对列组进行求和的问题(R: Problems using rollapply to sum groups of columns)
  • Allauth不会保存其他字段(Allauth will not save additional fields)
  • python中使用sys模块中sys.exit()好像不能退出?
  • 将Int拆分为3个字节并返回C语言(Splitting an Int to 3 bytes and back in C)
  • 在SD / MMC中启用DDR会导致问题吗?(Enabling DDR in SD/MMC causes problems? CMD 11 gives a response but the voltage switch wont complete)
  • sed没有按预期工作,从字符串中间删除特殊字符(sed not working as expected, removing special character from middle of string)
  • 如何将字符串转换为Elixir中的函数(how to convert a string to a function in Elixir)