protected function configure($options = array(), $attributes = array())
    {
        $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture());
        $this->addOption('width', sfConfig::get('sf_sfSelect2Widgets_width'));
        $this->addRequiredOption('model');
        $this->addOption('add_empty', false);
        $this->addOption('method', '__toString');
        $this->addOption('key_method', 'getPrimaryKey');
        $this->addOption('order_by', null);
        $this->addOption('query_methods', array());
        $this->addOption('criteria', null);
        $this->addOption('connection', null);
        $this->addOption('multiple', false);
        // not used anymore
        $this->addOption('peer_method', 'doSelect');

        parent::configure($options, $attributes);
        $this->setOption('type', 'hidden');
    }
protected function configure($options = array(), $attributes = array())
    {
        $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture());
        $this->addOption('width', sfConfig::get('sf_sfSelect2Widgets_width'));
        $this->addRequiredOption('model');
        $this->addOption('add_empty', false);
        $this->addOption('method', '__toString');
        $this->addOption('key_method', 'getPrimaryKey');
        $this->addOption('order_by', null);
        $this->addOption('query_methods', array());
        $this->addOption('criteria', null);
        $this->addOption('connection', null);
        $this->addOption('multiple', false);
        // not used anymore
        $this->addOption('peer_method', 'doSelect');

        parent::configure($options, $attributes);
        $this->setOption('type', 'hidden');
    }
protected function configure ( $ options = array ( ) , $ attributes = array ( ) ) { $ this -> addOption ( 'culture' , sfContext :: getInstance ( ) -> getUser ( ) -> getCulture ( ) ) ; $ this -> addOption ( 'width' , sfConfig :: get ( 'sf_sfSelect2Widgets_width' ) ) ; $ this -> addRequiredOption ( 'model' ) ; $ this -> addOption ( 'add_empty' , false ) ; $ this -> addOption ( 'method' , '__toString' ) ; $ this -> addOption ( 'key_method' , 'getPrimaryKey' ) ; $ this -> addOption ( 'order_by' , null ) ; $ this -> addOption ( 'query_methods' , array ( ) ) ; $ this -> addOption ( 'criteria' , null ) ; $ this -> addOption ( 'connection' , null ) ; $ this -> addOption ( 'multiple' , false ) ; // not used anymore $ this -> addOption ( 'peer_method' , 'doSelect' ) ; parent :: configure ( $ options , $ attributes ) ; $ this -> setOption ( 'type' , 'hidden' ) ; }
Configures the current widget.

Available options:

* url:            The URL to call to get the choices to use (required)
* config:         A JavaScript array that configures the JQuery autocompleter widget
* value_callback: A callback that converts the value before it is displayed

@param array $options     An array of options
@param array $attributes  An array of default HTML attributes

@see sfWidgetForm
Configures the current widget .