public function getDefaultSearchContext()
    {
        $context = parent::getDefaultSearchContext();
        $fields = $context->getSearchFields();

        $fields->removeByName('Gateway');
        $fields->removeByName('Created');

        $fields->insertAfter('Money', DropdownField::create(
            'Gateway',
            $this->fieldLabel('Gateway'),
            GatewayInfo::getSupportedGateways()
        )->setHasEmptyDefault(true));

        // create a localized status dropdown for the search-context
        $fields->insertAfter('Gateway', DropdownField::create(
            'Status',
            $this->fieldLabel('Status'),
            $this->getStatusValues()
        )->setHasEmptyDefault(true));

        $context->addFilter(new PartialMatchFilter('Gateway'));

        return $context;
    }
public function getDefaultSearchContext()
    {
        $context = parent::getDefaultSearchContext();
        $fields = $context->getSearchFields();

        $fields->removeByName('Gateway');
        $fields->removeByName('Created');

        $fields->insertAfter('Money', DropdownField::create(
            'Gateway',
            $this->fieldLabel('Gateway'),
            GatewayInfo::getSupportedGateways()
        )->setHasEmptyDefault(true));

        // create a localized status dropdown for the search-context
        $fields->insertAfter('Gateway', DropdownField::create(
            'Status',
            $this->fieldLabel('Status'),
            $this->getStatusValues()
        )->setHasEmptyDefault(true));

        $context->addFilter(new PartialMatchFilter('Gateway'));

        return $context;
    }
public function getDefaultSearchContext ( ) { $ context = parent :: getDefaultSearchContext ( ) ; $ fields = $ context -> getSearchFields ( ) ; $ fields -> removeByName ( 'Gateway' ) ; $ fields -> removeByName ( 'Created' ) ; $ fields -> insertAfter ( 'Money' , DropdownField :: create ( 'Gateway' , $ this -> fieldLabel ( 'Gateway' ) , GatewayInfo :: getSupportedGateways ( ) ) -> setHasEmptyDefault ( true ) ) ; // create a localized status dropdown for the search-context $ fields -> insertAfter ( 'Gateway' , DropdownField :: create ( 'Status' , $ this -> fieldLabel ( 'Status' ) , $ this -> getStatusValues ( ) ) -> setHasEmptyDefault ( true ) ) ; $ context -> addFilter ( new PartialMatchFilter ( 'Gateway' ) ) ; return $ context ; }
Change search context to use a dropdown for list of gateways.
Change search context to use a dropdown for list of gateways .