yml显示任何过滤器

yml显示任何过滤器

本文介绍了Symfony 1.4:如何不通过generator.yml显示任何过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Symfony 中创建了一个管理模块.我想显示表格列表,但没有过滤器.

I created an admin module in Symfony. I would like to show the table list but without filters.

默认情况下,我得到所有过滤器.我设法在模块的 filterForm文件中使用unset手动取消了所有过滤器的设置.更重要的是,我仅启用了一个过滤器并将其取消设置.为此使用了unset($this->widgetSchema['filter'], ...).我不喜欢这种解决方案.

By default I get all filters. I managed to unset all the filters by hand -using unset, in the filterForm file of the module. Even more, I enabled just one filter and unset it. Used the unset($this->widgetSchema['filter'], ...) for that. I don't like this solution.

我想使用generator.yml来做到这一点:

I would like to do it using the generator.yml:

我尝试过:

  I)   filter: false

  II)  filter:
         display: false

  III) filter:
        display: [] <-- empty!

没有工作.我读到可以使用凭据,但我想以一种更简单的具体方法来做到这一点.

None worked. I read that using credentials could be possible but I would like to do it in a more simple a concrete way.

谢谢.

编辑:我的实际发电机.真的是默认值吗?

EDIT:My actual generator. Is the default really:

generator:
class: sfPropelGenerator
param:
  model_class:           halt
  theme:                 admin15
  non_verbose_templates: true
  with_show:             false
  singular:              Halt
  plural:                Halts
  route_prefix:          halt
  with_propel_route:     1
  actions_base_class:    sfActions

config:
  actions: ~
  fields:  ~
  list:
    object_actions: {}
    batch_actions: {}
  filter:  ~
  form:    ~
  edit:    ~
  new:     ~

推荐答案

您差不多完成了,但是您并没有对所有内容进行测试:)

You are almost done but you don't test everything :)

filter:
  class: false

http://www.symfony-project. org/reference/1_4/en/06-Admin-Generator#chapter_06_filter

这篇关于Symfony 1.4:如何不通过generator.yml显示任何过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 13:40