ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/branches/work/fukamachi/topic_search/lib/filter/doctrine/PluginCommunityTopicFormFilter.class.php @ 12066

Last change on this file since 12066 was 12066, checked in by fukamachi, 14 years ago

#4019 change topic search on pc_frontend to be able to search events.

File size: 1.2 KB
Line 
1<?php
2
3/**
4 * CommunityTopic filter form.
5 *
6 * @package    OpenPNE
7 * @subpackage filter
8 * @author     Eitarow Fukamachi <fukamachi@tejimaya.net>
9 */
10class PluginCommunityTopicFormFilter extends BaseCommunityTopicFormFilter
11{
12  public function __construct($defaults = array(), $options = array(), $CSRFSecret = null)
13  {
14    return parent::__construct($defaults, $options, false);
15  }
16
17  public function configure()
18  {
19    $i18n = sfContext::getInstance()->getI18N();
20    $types = array(
21      'topic' => $i18n->__('Topic'),
22      'event' => $i18n->__('Event'),
23    );
24
25    $widgets = array(
26      'keyword' => new sfWidgetFormInput(array(
27        'label' => $i18n->__('Keyword', array(), 'form_community'),
28      )),
29      'type' => new sfWIdgetFormChoice(array(
30        'expanded' => true,
31        'choices' => $types,
32        'label' => $i18n->__('Target', array(), 'form_community'),
33      )),
34    );
35
36    $validators = array(
37      'keyword' => new opValidatorSearchQueryString(array('required' => false)),
38      'type' => new sfValidatorChoice(array('choices' => array_keys($types), 'required' => false)),
39    );
40
41    $this->setWidgets($widgets);
42    $this->setValidators($validators);
43  }
44}
Note: See TracBrowser for help on using the repository browser.